com.caucho.server.http
Class StreamWrapperResponseStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.caucho.vfs.OutputStreamWithBuffer
          extended by com.caucho.server.http.AbstractResponseStream
              extended by com.caucho.server.http.ToByteResponseStream
                  extended by com.caucho.server.http.StreamWrapperResponseStream
All Implemented Interfaces:
ByteAppendable, java.io.Closeable, java.io.Flushable

public class StreamWrapperResponseStream
extends ToByteResponseStream


Field Summary
 
Fields inherited from class com.caucho.server.http.ToByteResponseStream
SIZE
 
Constructor Summary
StreamWrapperResponseStream()
           
 
Method Summary
protected  void closeImpl()
          Close.
 void finish()
          Finish.
 void flush()
          flushing
 void init(java.io.OutputStream os)
           
protected  void writeNext(byte[] buf, int offset, int length, boolean isEnd)
          Writes the next chunk of data to the response stream.
 
Methods inherited from class com.caucho.server.http.ToByteResponseStream
clearBuffer, flushBuffer, flushByteBuffer, flushCharBuffer, getBuffer, getBufferLength, getBufferOffset, getBufferSize, getByteBufferOffset, getCharBuffer, getCharOffset, getContentLength, getRemaining, isCauchoResponseStream, isCharFlushing, isDisableAutoFlush, nextBuffer, nextCharBuffer, print, print, setBufferOffset, setBufferSize, setCharOffset, setEncoding, setFlush, setLocale, setOutputStreamOnly, start, write, write, writeHeaders
 
Methods inherited from class com.caucho.server.http.AbstractResponseStream
clear, close, completeCache, flushByte, flushChar, flushNext, getByteCacheStream, getCharCacheStream, getEncoding, isAutoFlush, isCloseComplete, isClosed, isClosing, isCommitted, isHead, killCaching, sendFile, setAutoFlush, setByteCacheStream, setCauchoResponse, setCharCacheStream, setCommitted, setHead, toClosing, toString
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StreamWrapperResponseStream

public StreamWrapperResponseStream()
Method Detail

init

public void init(java.io.OutputStream os)

writeNext

protected void writeNext(byte[] buf,
                         int offset,
                         int length,
                         boolean isEnd)
                  throws java.io.IOException
Writes the next chunk of data to the response stream.

Specified by:
writeNext in class ToByteResponseStream
Parameters:
buf - the buffer containing the data
offset - start offset into the buffer
length - length of the data in the buffer
Throws:
java.io.IOException

flush

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

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class ToByteResponseStream
Throws:
java.io.IOException

finish

public void finish()
            throws java.io.IOException
Finish.

Throws:
java.io.IOException

closeImpl

protected void closeImpl()
                  throws java.io.IOException
Close.

Overrides:
closeImpl in class ToByteResponseStream
Throws:
java.io.IOException