org.openqa.jetty.http
Class ChunkingOutputStream
java.lang.Object
java.io.OutputStream
org.openqa.jetty.util.ByteBufferOutputStream
org.openqa.jetty.http.BufferedOutputStream
org.openqa.jetty.http.ChunkingOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, HttpMessage.HeaderWriter
public class ChunkingOutputStream
- extends BufferedOutputStream
- implements HttpMessage.HeaderWriter
HTTP Chunking OutputStream.
- Version:
- $Id: ChunkingOutputStream.java,v 1.6 2004/10/19 00:27:23 gregwilkins Exp $
- Author:
- Greg Wilkins
Constructor Summary |
ChunkingOutputStream(java.io.OutputStream outputStream,
int bufferSize,
int headerReserve)
Constructor. |
ChunkingOutputStream(java.io.OutputStream outputStream,
int bufferSize,
int headerReserve,
boolean chunking)
Constructor. |
Methods inherited from class org.openqa.jetty.http.BufferedOutputStream |
destroy, flush, getBypassBuffer, getCommitObserver, getOutputStream, isCommitted, setBypassBuffer, setCommitObserver, write, write, writeHeader |
Methods inherited from class org.openqa.jetty.util.ByteBufferOutputStream |
bufferSize, capacity, ensureCapacity, ensureReserve, ensureSize, ensureSize, ensureSpareCapacity, isFixed, postReserve, postwrite, 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 |
ChunkingOutputStream
public ChunkingOutputStream(java.io.OutputStream outputStream,
int bufferSize,
int headerReserve)
- Constructor.
- Parameters:
outputStream
- The outputStream to buffer or chunk to.
ChunkingOutputStream
public ChunkingOutputStream(java.io.OutputStream outputStream,
int bufferSize,
int headerReserve,
boolean chunking)
- Constructor.
- Parameters:
outputStream
- The outputStream to buffer or chunk to.
isChunking
public boolean isChunking()
setChunking
public void setChunking(boolean chunking)
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class BufferedOutputStream
- Throws:
java.io.IOException
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
- Throws:
java.io.IOException
bypassWrite
protected void bypassWrite(byte[] b,
int offset,
int length)
throws java.io.IOException
- Overrides:
bypassWrite
in class BufferedOutputStream
- Throws:
java.io.IOException
Copyright © 2011. All Rights Reserved.