@Override protected void receiveContent(InputStream content) { if (content == null) return; try { this.content = getReader().read( new InputStreamReader(content, "UTF-8") ); } catch (IOException e) { throw new MarkLogicIOException(e); } catch (DocumentException e) { throw new MarkLogicIOException(e); } }
@Override protected void receiveContent(InputStream content) { if (content == null) return; try { this.content = getReader().read( new InputStreamReader(content, "UTF-8") ); } catch (IOException e) { throw new MarkLogicIOException(e); } catch (DocumentException e) { throw new MarkLogicIOException(e); } finally { try { content.close(); } catch (IOException e) { // ignore. } } }