@Override public void write(java.io.Writer writer) throws IOException { OutputStream os = IoUtils.getStream(writer, getCharacterSet()); write(os); os.flush(); }
@Override public Reader getReader() throws IOException { return IoUtils.getReader(getStream(), getCharacterSet()); }
/** * Closes and releases the input stream. */ @Override public void release() { if (this.stream != null) { try { this.stream.close(); } catch (IOException e) { Context.getCurrentLogger().log(Level.WARNING, "Error while releasing the representation.", e); } this.stream = null; } super.release(); }
@Override public void write(java.nio.channels.WritableByteChannel writableChannel) throws IOException { OutputStream os = IoUtils.getStream(writableChannel); write(os); os.flush(); }
@Override public java.nio.channels.ReadableByteChannel getChannel() throws IOException { return IoUtils.getChannel(getStream()); }
/** * Closes and releases the input stream. */ @Override public void release() { if (this.stream != null) { try { this.stream.close(); } catch (IOException e) { Context.getCurrentLogger().log(Level.WARNING, "Error while releasing the representation.", e); } this.stream = null; } super.release(); }