@Override public void flushBuffer() throws IOException { checkException(); if(os != null) { os.flush(); } } }
@Override public void sendError(int status) throws IOException { checkException(); sendError(status, null); }
@Override public void sendError(int status, String message) throws IOException { checkException(); if (committed) { throw new IllegalStateException(); } response.setStatusCode(status); if (message != null) { response.end(message); } else { response.end(); } committed = true; }
public void finish() throws IOException { checkException(); if (os != null) { os.flush(); if (!isCommitted()) { prepareChunkStream(); } } else { prepareEmptyResponse(); } response.end(); }
@Override public void flush() throws IOException { int readable = buffer.length(); if (readable == 0) return; if (!response.isCommitted()) response.prepareChunkStream(); response.checkException(); response.response.write(buffer); buffer = Buffer.buffer(); super.flush(); }
@Override public void flushBuffer() throws IOException { checkException(); if(os != null) { os.flush(); } } }
@Override public void sendError(int status) throws IOException { checkException(); sendError(status, null); }
@Override public void sendError(int status, String message) throws IOException { checkException(); if (committed) { throw new IllegalStateException(); } response.setStatusCode(status); if (message != null) { response.end(message); } else { response.end(); } committed = true; }
public void finish() throws IOException { checkException(); if (os != null) { os.flush(); if (!isCommitted()) { prepareChunkStream(); } } else { prepareEmptyResponse(); } response.end(); }
@Override public void flush() throws IOException { int readable = buffer.length(); if (readable == 0) return; if (!response.isCommitted()) response.prepareChunkStream(); response.checkException(); response.response.write(buffer); buffer = Buffer.factory.buffer(); super.flush(); }