public Reader getData(String query) { contentStream = context.docBuilder.requestParameters.contentStream; if (contentStream == null) throw new DataImportHandlerException(SEVERE, "No stream available. The request has no body"); try { return reader = contentStream.getReader(); } catch (IOException e) { DataImportHandlerException.wrapAndThrow(SEVERE, e); return null; } }
@Override public InputStream getData(String query) { contentStream = context.getDocBuilder().getReqParams().getContentStream(); if (contentStream == null) throw new DataImportHandlerException(SEVERE, "No stream available. The request has no body"); try { return in = contentStream.getStream(); } catch (IOException e) { DataImportHandlerException.wrapAndThrow(SEVERE, e); return null; } }