public class ChunkingOutputStream extends BufferedOutputStream implements HttpMessage.HeaderWriter
_httpMessageWriter, _out
_buf
Constructor and Description |
---|
ChunkingOutputStream(java.io.OutputStream outputStream,
int bufferSize,
int headerReserve)
Constructor.
|
ChunkingOutputStream(java.io.OutputStream outputStream,
int bufferSize,
int headerReserve,
boolean chunking)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
bypassWrite(byte[] b,
int offset,
int length) |
void |
close() |
boolean |
isChunking() |
void |
resetStream() |
void |
setChunking(boolean chunking) |
protected void |
wrapBuffer()
Wrap Buffer.
|
destroy, flush, getBypassBuffer, getCommitObserver, getOutputStream, isCommitted, setBypassBuffer, setCommitObserver, write, write, writeHeader
bufferSize, capacity, ensureCapacity, ensureReserve, ensureSize, ensureSize, ensureSpareCapacity, isFixed, postReserve, postwrite, postwrite, preReserve, prewrite, prewrite, prewrite, reset, setFixed, size, spareCapacity, write, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
writeHeader
public ChunkingOutputStream(java.io.OutputStream outputStream, int bufferSize, int headerReserve)
outputStream
- The outputStream to buffer or chunk to.public ChunkingOutputStream(java.io.OutputStream outputStream, int bufferSize, int headerReserve, boolean chunking)
outputStream
- The outputStream to buffer or chunk to.public boolean isChunking()
public void setChunking(boolean chunking)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class BufferedOutputStream
java.io.IOException
public void resetStream()
resetStream
in class BufferedOutputStream
protected void wrapBuffer() throws java.io.IOException
BufferedOutputStream
wrapBuffer
in class BufferedOutputStream
java.io.IOException
protected void bypassWrite(byte[] b, int offset, int length) throws java.io.IOException
bypassWrite
in class BufferedOutputStream
java.io.IOException
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.