org.mortbay.http
public class BufferedOutputStream extends ByteBufferOutputStream implements HttpMessage.HeaderWriter
Version: $Revision: 1.8 $
Field Summary | |
---|---|
protected ByteArrayISO8859Writer | _httpMessageWriter |
protected OutputStream | _out |
Constructor Summary | |
---|---|
BufferedOutputStream(OutputStream out, int capacity, int headerReserve, int preReserve, int postReserve) Constructor. |
Method Summary | |
---|---|
protected void | bypassWrite(byte[] b, int offset, int length) |
void | close() |
void | destroy() |
void | flush()
This implementation calls the commitObserver on the first flush since
construction or reset. |
boolean | getBypassBuffer() |
OutputObserver | getCommitObserver() |
OutputStream | getOutputStream() |
boolean | isCommitted() |
void | resetStream() |
void | setBypassBuffer(boolean bypassBuffer) |
void | setCommitObserver(OutputObserver commitObserver) |
protected void | wrapBuffer() Wrap Buffer.
|
void | write(byte[] b) |
void | write(byte[] b, int offset, int length) |
void | writeHeader(HttpMessage httpMessage) |
Parameters: out the OutputStream to buffer to. capacity Buffer capacity. headerReserve The reserve of bytes for prepending to be used for the first buffer after reset preReserve The reserve of bytes for prepending postReserve The reserve of bytes for appending
Returns: If true, the buffer is bypassed for large writes to a committed stream.
Returns: OutputObserver to receives commit events from this stream.
Parameters: bypassBuffer If true, the buffer is bypassed for large writes to a committed stream.
Parameters: commitObserver OutputObserver to receives commit events from this stream.
Throws: IOException