public class ChunkingOutputStream extends BufferedOutputStream implements HttpMessage.HeaderWriter
_httpMessageWriter, _out
_buf
Constructor and Description |
---|
ChunkingOutputStream(OutputStream outputStream,
int bufferSize,
int headerReserve)
Constructor.
|
ChunkingOutputStream(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(OutputStream outputStream, int bufferSize, int headerReserve)
outputStream
- The outputStream to buffer or chunk to.public ChunkingOutputStream(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 IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class BufferedOutputStream
IOException
public void resetStream()
resetStream
in class BufferedOutputStream
protected void wrapBuffer() throws IOException
BufferedOutputStream
wrapBuffer
in class BufferedOutputStream
IOException
protected void bypassWrite(byte[] b, int offset, int length) throws IOException
bypassWrite
in class BufferedOutputStream
IOException
Copyright © 2016. All Rights Reserved.