org.mortbay.http
public class HttpOutputStream extends OutputStream implements OutputObserver, HttpMessage.HeaderWriter
Version: $Id: HttpOutputStream.java,v 1.28 2006/10/08 14:13:05 gregwilkins Exp $
| Field Summary | |
|---|---|
| static Class[] | __filterArg |
| Constructor Summary | |
|---|---|
| HttpOutputStream(OutputStream outputStream) Constructor. | |
| HttpOutputStream(OutputStream outputStream, int bufferSize) Constructor. | |
| HttpOutputStream(OutputStream outputStream, int bufferSize, int headerReserve) Constructor. | |
| Method Summary | |
|---|---|
| void | addObserver(OutputObserver observer) Add an Output Observer.
|
| void | addObserver(OutputObserver observer, Object data) Add an Output Observer.
|
| protected void | checkOutput() |
| void | close() Close the stream. |
| void | destroy() |
| void | flush() |
| OutputStream | getBufferedOutputStream() Get the buffered output stream. |
| int | getBufferSize() Get the output buffer capacity. |
| int | getBytesWritten() |
| OutputStream | getOutputStream() Get the backing output stream.
|
| Writer | getWriter(String encoding) |
| boolean | isChunking() Get chunking mode |
| boolean | isClosed() Close the stream. |
| boolean | isNullOutput() is the output Nulled? |
| boolean | isWritten() Has any data been written to the stream. |
| void | nullOutput() Null the output.
|
| void | outputNotify(OutputStream out, int action, Object ignoredData) Output Notification.
|
| protected int | prepareOutput(int length) |
| void | resetBuffer() Reset Buffered output.
|
| void | resetObservers() Reset the observers. |
| void | resetStream() Reset the stream.
|
| void | setBufferedOutputStream(BufferedOutputStream bos) |
| void | setBufferSize(int size) Set the output buffer size.
|
| void | setChunking() Set chunking mode. |
| void | setContentLength(int length) |
| String | toString() |
| void | write(int b) |
| void | write(byte[] b) |
| void | write(byte[] b, int off, int len) |
| void | write(InputStream in, int len) |
| void | writeHeader(HttpMessage httpMessage) |
Parameters: outputStream The outputStream to buffer or chunk to.
Parameters: outputStream The outputStream to buffer or chunk to.
Parameters: outputStream The outputStream to buffer or chunk to.
Parameters: observer The observer.
Parameters: observer The observer. data Data to be passed wit notify calls.
Throws: IOException
Returns: Buffer capacity in bytes.
Returns: Raw OutputStream.
Throws: IOException
Returns: True if write has been called.
Throws: IllegalStateException
Throws: IllegalStateException The stream cannot be reset if chunking is enabled.
Parameters: size Minimum buffer size in bytes
Throws: IllegalStateException If output has been written.