All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.apache.tomcat.core.BufferedServletOutputStream

java.lang.Object
   |
   +----java.io.OutputStream
           |
           +----javax.servlet.ServletOutputStream
                   |
                   +----org.apache.tomcat.core.BufferedServletOutputStream

public class BufferedServletOutputStream
extends ServletOutputStream
Works only if you extend ResponseImpl and override doWrite() - all other implementations of Response should provide their own Stream

Author:
James Duncan Davidson [duncan@eng.sun.com], Jason Hunter [jch@eng.sun.com], James Todd [gonzo@eng.sun.com], Mandar Raje [mandar@eng.sun.com]

Variable Index

 o buffer
 o bufferCount
 o bufferSize
 o closed
 o committed
 o DEFAULT_BUFFER_SIZE
 o sm
 o totalCount
 o usingWriter

Constructor Index

 o BufferedServletOutputStream()
 o BufferedServletOutputStream(Response)

Method Index

 o close()
 o doWrite(byte[], int, int)
 o flush()
 o getBufferSize()
 o isCommitted()
 o isContentWritten()
 o print(String)
Writes a String to the client, without a carriage return-line feed (CRLF) character at the end.
 o reallyFlush()
 o recycle()
Reuse the object instance, avoid GC
 o reset()
 o sendHeaders()
 o setBufferSize(int)
 o setResponse(Response)
 o setUsingWriter(boolean)
 o write(byte[])
 o write(byte[], int, int)
 o write(int)

Variables

 o sm
 protected StringManager sm
 o usingWriter
 protected boolean usingWriter
 o DEFAULT_BUFFER_SIZE
 protected static final int DEFAULT_BUFFER_SIZE
 o buffer
 protected byte buffer[]
 o bufferSize
 protected int bufferSize
 o bufferCount
 protected int bufferCount
 o totalCount
 protected int totalCount
 o committed
 protected boolean committed
 o closed
 protected boolean closed

Constructors

 o BufferedServletOutputStream
 protected BufferedServletOutputStream()
 o BufferedServletOutputStream
 protected BufferedServletOutputStream(Response resA)

Methods

 o doWrite
 protected void doWrite(byte buffer[],
                        int pos,
                        int count) throws IOException
 o sendHeaders
 protected void sendHeaders() throws IOException
 o setResponse
 public void setResponse(Response response)
 o setUsingWriter
 public void setUsingWriter(boolean uwrt)
 o write
 public void write(int i) throws IOException
Overrides:
write in class OutputStream
 o write
 public void write(byte b[]) throws IOException
Overrides:
write in class OutputStream
 o write
 public void write(byte b[],
                   int off,
                   int len) throws IOException
Overrides:
write in class OutputStream
 o print
 public void print(String s) throws IOException
Writes a String to the client, without a carriage return-line feed (CRLF) character at the end.

Overrides:
print in class ServletOutputStream
 o flush
 public void flush() throws IOException
Overrides:
flush in class OutputStream
 o reallyFlush
 public void reallyFlush() throws IOException
 o close
 public void close() throws IOException
Overrides:
close in class OutputStream
 o isContentWritten
 public boolean isContentWritten()
 o isCommitted
 public boolean isCommitted()
 o getBufferSize
 public int getBufferSize()
 o setBufferSize
 public void setBufferSize(int size) throws IllegalStateException
 o reset
 public void reset() throws IllegalStateException
 o recycle
 public void recycle()
Reuse the object instance, avoid GC


All Packages  Class Hierarchy  This Package  Previous  Next  Index