java.lang.Object
java.io.OutputStream
org.mortbay.util.ByteBufferOutputStream
org.mortbay.http.BufferedOutputStream
org.mortbay.http.ChunkingOutputStream
- All Implemented Interfaces:
- HttpMessage.HeaderWriter
- public class ChunkingOutputStream
- extends BufferedOutputStream
- implements HttpMessage.HeaderWriter
HTTP Chunking OutputStream.
- Version:
- $Id: ChunkingOutputStream.java,v 1.3 2003/04/24 23:56:12 bretts Exp $
| Methods inherited from class org.mortbay.util.ByteBufferOutputStream |
bufferSize, capacity, ensureCapacity, ensureReserve, ensureSize, ensureSize, ensureSpareCapacity, isFixed, postReserve, postwrite, preReserve, prewrite, prewrite, prewrite, reset, setFixed, size, spareCapacity, write, writeTo |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
__CRLF
static final byte[] __CRLF
__CHUNK_EOF
static final byte[] __CHUNK_EOF
__CHUNK_RESERVE
static final int __CHUNK_RESERVE
- See Also:
- Constant Field Values
__EOF_RESERVE
static final int __EOF_RESERVE
- See Also:
- Constant Field Values
_trailer
private HttpFields _trailer
_complete
private boolean _complete
_completed
private boolean _completed
ChunkingOutputStream
public ChunkingOutputStream(java.io.OutputStream outputStream,
int bufferSize,
int headerReserve)
- Constructor.
setTrailer
public void setTrailer(HttpFields trailer)
- Set the trailer to send with a chunked close.
flush
public void flush()
throws java.io.IOException
- Flush.
- Overrides:
flush in class BufferedOutputStream
close
public void close()
throws java.io.IOException
- Description copied from class:
java.io.OutputStream
- This method closes the stream. Any internal or native resources
associated with this stream are freed. Any subsequent attempt to
access the stream might throw an exception.
This method in this class does nothing.
- Overrides:
close in class BufferedOutputStream
resetStream
public void resetStream()
- Overrides:
resetStream in class BufferedOutputStream
wrapBuffer
protected void wrapBuffer()
throws java.io.IOException
- Description copied from class:
BufferedOutputStream
- Wrap Buffer.
Called by flush() to allow the data in the buffer to be pre and post
written for any protocol wrapping. The default implementation does
nothing.
- Overrides:
wrapBuffer in class BufferedOutputStream
bypassWrite
protected void bypassWrite(byte[] b,
int offset,
int length)
throws java.io.IOException
- Overrides:
bypassWrite in class BufferedOutputStream