org.mortbay.http
Class ChunkingOutputStream

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 $
Author:
Greg Wilkins

Constructor Summary
ChunkingOutputStream(java.io.OutputStream outputStream, int bufferSize, int headerReserve)
          Constructor.
 
Method Summary
 void close()
           
 void flush()
          Flush.
 void resetStream()
           
 void setTrailer(HttpFields trailer)
          Set the trailer to send with a chunked close.
 
Methods inherited from class org.mortbay.http.BufferedOutputStream
destroy, getBypassBuffer, getCommitObserver, getOutputStream, isCommitted, setBypassBuffer, setCommitObserver, write, write, writeHeader
 
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mortbay.http.HttpMessage.HeaderWriter
writeHeader
 

Constructor Detail

ChunkingOutputStream

public ChunkingOutputStream(java.io.OutputStream outputStream,
                            int bufferSize,
                            int headerReserve)
Constructor.

Parameters:
outputStream - The outputStream to buffer or chunk to.
Method Detail

setTrailer

public void setTrailer(HttpFields trailer)
Set the trailer to send with a chunked close.

Parameters:
trailer -

flush

public void flush()
           throws java.io.IOException
Flush.

Overrides:
flush in class BufferedOutputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Overrides:
close in class BufferedOutputStream
java.io.IOException

resetStream

public void resetStream()
Overrides:
resetStream in class BufferedOutputStream


Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.