winstone
Class WinstoneOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
          extended by winstone.WinstoneOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable
Direct Known Subclasses:
Ajp13OutputStream

public class WinstoneOutputStream
extends ServletOutputStream

Matches the socket output stream to the servlet output.

Version:
$Id: WinstoneOutputStream.java,v 1.19 2007/10/14 14:48:14 rickknowles Exp $
Author:
Rick Knowles

Field Summary
protected  boolean bodyOnly
           
protected  java.io.ByteArrayOutputStream buffer
           
protected  long bufferPosition
           
protected  long bufferSize
           
protected  long bytesCommitted
           
protected  boolean closed
           
protected  boolean committed
           
protected  boolean disregardMode
           
protected  java.util.Stack includeByteStreams
           
protected  java.io.OutputStream outStream
           
protected  WinstoneResponse owner
           
 
Constructor Summary
WinstoneOutputStream(java.io.OutputStream out, boolean bodyOnlyForInclude)
          Constructor
 
Method Summary
 void clearIncludeStackForForward()
           
 void close()
           
 void commit()
           
 void finishIncludeBuffer()
           
 void finishResponse()
           
 void flush()
           
 long getBufferSize()
           
 long getBytesCommitted()
           
 long getOutputStreamLength()
           
 boolean isCommitted()
           
 boolean isIncluding()
           
 void reset()
           
 void setBufferSize(int bufferSize)
           
 void setClosed(boolean closed)
           
 void setDisregardMode(boolean disregard)
           
 void setResponse(WinstoneResponse response)
           
 void startIncludeBuffer()
           
 void write(byte[] b, int off, int len)
           
 void write(int oneChar)
           
 
Methods inherited from class javax.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outStream

protected java.io.OutputStream outStream

bufferSize

protected long bufferSize

bufferPosition

protected long bufferPosition

bytesCommitted

protected long bytesCommitted

buffer

protected java.io.ByteArrayOutputStream buffer

committed

protected boolean committed

bodyOnly

protected boolean bodyOnly

owner

protected WinstoneResponse owner

disregardMode

protected boolean disregardMode

closed

protected boolean closed

includeByteStreams

protected java.util.Stack includeByteStreams
Constructor Detail

WinstoneOutputStream

public WinstoneOutputStream(java.io.OutputStream out,
                            boolean bodyOnlyForInclude)
Constructor

Method Detail

setResponse

public void setResponse(WinstoneResponse response)

getBufferSize

public long getBufferSize()

setBufferSize

public void setBufferSize(int bufferSize)

isCommitted

public boolean isCommitted()

getOutputStreamLength

public long getOutputStreamLength()

getBytesCommitted

public long getBytesCommitted()

setDisregardMode

public void setDisregardMode(boolean disregard)

setClosed

public void setClosed(boolean closed)

write

public void write(int oneChar)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

commit

public void commit()
            throws java.io.IOException
Throws:
java.io.IOException

reset

public void reset()

finishResponse

public void finishResponse()
                    throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException

isIncluding

public boolean isIncluding()

startIncludeBuffer

public void startIncludeBuffer()

finishIncludeBuffer

public void finishIncludeBuffer()
                         throws java.io.IOException
Throws:
java.io.IOException

clearIncludeStackForForward

public void clearIncludeStackForForward()
                                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2013. All Rights Reserved.