@Override public void flushBuffer() throws IOException { if (!_out.isClosed()) _out.flush(); }
@Override public void flushBuffer() throws IOException { if (!_out.isClosed()) _out.flush(); }
@Override public void flushBuffer() throws IOException { if (!_out.isClosed()) _out.flush(); }
@Override public void flushBuffer() throws IOException { if (!_out.isClosed()) _out.flush(); }
@Override public void flushBuffer() throws IOException { if (!_out.isClosed()) _out.flush(); }
@Override public void flushBuffer() throws IOException { if (!_out.isClosed()) _out.flush(); }
@Override public void print(String s) throws IOException { if (isClosed()) throw new IOException("Closed"); write(s.getBytes(_channel.getResponse().getCharacterEncoding())); }
@Override public void print(String s) throws IOException { if (isClosed()) throw new IOException("Closed"); write(s.getBytes(_channel.getResponse().getCharacterEncoding())); }
@Override public void print(String s) throws IOException { if (isClosed()) throw new IOException("Closed"); write(s.getBytes(_channel.getResponse().getCharacterEncoding())); }
@Override public void print(String s) throws IOException { if (isClosed()) throw new IOException("Closed"); write(s.getBytes(_channel.getResponse().getCharacterEncoding())); }
@Override public void print(String s) throws IOException { if (isClosed()) throw new IOException("Closed"); write(s.getBytes(_channel.getResponse().getCharacterEncoding())); }
@Override public void flush() throws IOException { if (isClosed()) return; if (BufferUtil.hasContent(_aggregate)) _channel.write(_aggregate, false); else _channel.write(BufferUtil.EMPTY_BUFFER, false); }
@Override public void flush() throws IOException { if (isClosed()) return; if (BufferUtil.hasContent(_aggregate)) _channel.write(_aggregate, false); else _channel.write(BufferUtil.EMPTY_BUFFER, false); }
public void closeOutput() throws IOException { switch (_outputType) { case WRITER: _writer.close(); if (!_out.isClosed()) _out.close(); break; case STREAM: getOutputStream().close(); break; default: _out.close(); } }
public void closeOutput() throws IOException { switch (_outputType) { case WRITER: _writer.close(); if (!_out.isClosed()) _out.close(); break; case STREAM: getOutputStream().close(); break; default: _out.close(); } }
public void closeOutput() throws IOException { switch (_outputType) { case WRITER: _writer.close(); if (!_out.isClosed()) _out.close(); break; case STREAM: getOutputStream().close(); break; default: _out.close(); } }
@Override public void write(int b) throws IOException { if (isClosed()) throw new EOFException("Closed"); if (_aggregate == null) _aggregate = _channel.getByteBufferPool().acquire(getBufferSize(), OUTPUT_BUFFER_DIRECT); BufferUtil.append(_aggregate, (byte)b); _written++; // Check if all written or full if (!closeIfAllContentWritten() && BufferUtil.isFull(_aggregate)) _channel.write(_aggregate, false); }
@Override public void write(int b) throws IOException { if (isClosed()) throw new EOFException("Closed"); if (_aggregate == null) _aggregate = _channel.getByteBufferPool().acquire(getBufferSize(), OUTPUT_BUFFER_DIRECT); BufferUtil.append(_aggregate, (byte)b); _written++; // Check if all written or full if (!closeIfAllContentWritten() && BufferUtil.isFull(_aggregate)) _channel.write(_aggregate, false); }
@Override public void close() { if (!isClosed()) { try { if (BufferUtil.hasContent(_aggregate)) _channel.write(_aggregate, !_channel.getResponse().isIncluding()); else _channel.write(BufferUtil.EMPTY_BUFFER, !_channel.getResponse().isIncluding()); } catch(IOException e) { _channel.getEndPoint().shutdownOutput(); LOG.ignore(e); } } closed(); }