Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » coyote » http11 » [javadoc | source]
org.apache.coyote.http11
public class: InternalNioOutputBuffer [javadoc | source]
java.lang.Object
   org.apache.coyote.http11.InternalNioOutputBuffer

All Implemented Interfaces:
    OutputBuffer

Output buffer.
Nested Class Summary:
protected class  InternalNioOutputBuffer.SocketOutputBuffer  This class is an output buffer which will write data to an output stream. 
Field Summary
 int bbufLimit     
protected static  StringManager sm    The string manager for this package. 
protected  Response response    Associated Coyote response. 
protected  MimeHeaders headers    Headers of the associated request. 
protected  boolean committed    Committed flag. 
protected  boolean finished    Finished flag. 
protected  byte[] buf    Pointer to the current write buffer. 
protected  int pos    Position in the buffer. 
protected  MutableInteger lastWrite    Number of bytes last written 
protected  NioChannel socket    Underlying socket. 
protected  NioSelectorPool pool    Selector pool, for blocking reads and blocking writes 
protected  OutputBuffer outputStreamOutputBuffer    Underlying output buffer. 
protected  OutputFilter[] filterLibrary    Filter library. Note: Filter[0] is always the "chunked" filter. 
protected  OutputFilter[] activeFilters    Active filter (which is actually the top of the pipeline). 
protected  int lastActiveFilter    Index of the last active filter. 
 int total     
Constructor:
 public InternalNioOutputBuffer(Response response) 
    Default constructor.
 public InternalNioOutputBuffer(Response response,
    int headerBufferSize) 
    Alternate constructor.
Method from org.apache.coyote.http11.InternalNioOutputBuffer Summary:
addActiveFilter,   addFilter,   clearFilters,   commit,   doWrite,   endHeaders,   endRequest,   flush,   flushBuffer,   getFilters,   getSelectorPool,   getSocket,   isWritable,   nextRequest,   recycle,   reset,   sendAck,   sendHeader,   sendHeader,   sendHeader,   sendStatus,   setSelectorPool,   setSocket,   setSocketBuffer,   write,   write,   write,   write,   write,   write
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.coyote.http11.InternalNioOutputBuffer Detail:
 public  void addActiveFilter(OutputFilter filter) 
    Add an output filter to the filter library.
 public  void addFilter(OutputFilter filter) 
    Add an output filter to the filter library.
 public  void clearFilters() 
    Clear filters.
 protected  void commit() throws IOException 
    Commit the response.
 public int doWrite(ByteChunk chunk,
    Response res) throws IOException 
    Write the contents of a byte chunk.
 public  void endHeaders() 
    End the header block.
 public  void endRequest() throws IOException 
    End request.
 public  void flush() throws IOException 
    Flush the response.
 protected  void flushBuffer() throws IOException 
    Callback to write data from the buffer.
 public OutputFilter[] getFilters() 
    Get filters.
 public NioSelectorPool getSelectorPool() 
 public NioChannel getSocket() 
    Get the underlying socket input stream.
 public boolean isWritable() 
 public  void nextRequest() 
    End processing of current HTTP request. Note: All bytes of the current request should have been already consumed. This method only resets all the pointers so that we are ready to parse the next HTTP request.
 public  void recycle() 
    Recycle the output buffer. This should be called when closing the connection.
 public  void reset() 
    Reset current response.
 public  void sendAck() throws IOException 
    Send an acknoledgement.
 public  void sendHeader(MessageBytes name,
    MessageBytes value) 
    Send a header.
 public  void sendHeader(ByteChunk name,
    ByteChunk value) 
    Send a header.
 public  void sendHeader(String name,
    String value) 
    Send a header.
 public  void sendStatus() 
    Send the response status line.
 public  void setSelectorPool(NioSelectorPool pool) 
 public  void setSocket(NioChannel socket) 
    Set the underlying socket.
 public  void setSocketBuffer(int socketBufferSize) 
    Set the socket buffer size.
 protected  void write(MessageBytes mb) 
    This method will write the contents of the specyfied message bytes buffer to the output stream, without filtering. This method is meant to be used to write the response header.
 protected  void write(ByteChunk bc) 
    This method will write the contents of the specyfied message bytes buffer to the output stream, without filtering. This method is meant to be used to write the response header.
 protected  void write(CharChunk cc) 
    This method will write the contents of the specyfied char buffer to the output stream, without filtering. This method is meant to be used to write the response header.
 public  void write(byte[] b) 
    This method will write the contents of the specyfied byte buffer to the output stream, without filtering. This method is meant to be used to write the response header.
 protected  void write(String s) 
    This method will write the contents of the specyfied String to the output stream, without filtering. This method is meant to be used to write the response header.
 protected  void write(int i) 
    This method will print the specified integer to the output stream, without filtering. This method is meant to be used to write the response header.