| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.coyote.http11.AbstractInputBuffer
org.apache.coyote.http11.InternalInputBuffer
public class InternalInputBuffer
Implementation of InputBuffer which provides HTTP request header parsing as well as transfer decoding.
| Nested Class Summary | |
|---|---|
| protected  class | InternalInputBuffer.InputStreamInputBufferThis class is an input buffer which will read its data from an input stream. | 
| Field Summary | |
|---|---|
| protected  InputFilter[] | activeFiltersActive filters (in order). | 
| protected  byte[] | bufPointer to the current read buffer. | 
| protected  int | endPos of the end of the header in the buffer, which is also the start of the body. | 
| protected  InputFilter[] | filterLibraryFilter library. | 
| protected  MimeHeaders | headersHeaders of the associated request. | 
| protected  java.io.InputStream | inputStreamUnderlying input stream. | 
| protected  InputBuffer | inputStreamInputBufferUnderlying input buffer. | 
| protected  int | lastActiveFilterIndex of the last active filter. | 
| protected  int | lastValidLast valid byte. | 
| protected  boolean | parsingHeaderState. | 
| protected  int | posPosition in the buffer. | 
| protected  Request | requestAssociated Coyote request. | 
| protected  boolean | swallowInputSwallow input ? | 
| Fields inherited from class org.apache.coyote.http11.AbstractInputBuffer | 
|---|
| sm | 
| Constructor Summary | |
|---|---|
| InternalInputBuffer(Request request)Default constructor. | |
| InternalInputBuffer(Request request,
                    int headerBufferSize)Alternate constructor. | |
| Method Summary | |
|---|---|
|  void | addActiveFilter(InputFilter filter)Add an input filter to the filter library. | 
|  void | addFilter(InputFilter filter)Add an input filter to the filter library. | 
|  void | clearFilters()Clear filters. | 
|  int | doRead(ByteChunk chunk,
       Request req)Read some bytes. | 
|  void | endRequest()End request (consumes leftover bytes). | 
| protected  boolean | fill()Fill the internal buffer using data from the undelying input stream. | 
|  InputFilter[] | getFilters()Get filters. | 
|  java.io.InputStream | getInputStream()Get the underlying socket input stream. | 
|  void | nextRequest()End processing of current HTTP request. | 
|  boolean | parseHeader()Parse an HTTP header. | 
|  void | parseHeaders()Parse the HTTP headers. | 
|  void | parseRequestLine()Read the request line. | 
|  void | recycle()Recycle the input buffer. | 
|  void | setInputStream(java.io.InputStream inputStream)Set the underlying socket input stream. | 
|  void | setSwallowInput(boolean swallowInput)Set the swallow input flag. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected Request request
protected MimeHeaders headers
protected boolean parsingHeader
protected boolean swallowInput
protected byte[] buf
protected int lastValid
protected int pos
protected int end
protected java.io.InputStream inputStream
protected InputBuffer inputStreamInputBuffer
protected InputFilter[] filterLibrary
protected InputFilter[] activeFilters
protected int lastActiveFilter
| Constructor Detail | 
|---|
public InternalInputBuffer(Request request)
public InternalInputBuffer(Request request,
                           int headerBufferSize)
| Method Detail | 
|---|
public void setInputStream(java.io.InputStream inputStream)
public java.io.InputStream getInputStream()
public void addFilter(InputFilter filter)
public InputFilter[] getFilters()
public void clearFilters()
public void addActiveFilter(InputFilter filter)
public void setSwallowInput(boolean swallowInput)
public void recycle()
public void nextRequest()
public void endRequest()
                throws java.io.IOException
java.io.IOException - an undelying I/O error occured
public void parseRequestLine()
                      throws java.io.IOException
java.io.IOException - If an exception occurs during the underlying socket
 read operations, or if the given buffer is not big enough to accomodate
 the whole line.
public void parseHeaders()
                  throws java.io.IOException
java.io.IOException
public boolean parseHeader()
                    throws java.io.IOException
java.io.IOException
public int doRead(ByteChunk chunk,
                  Request req)
           throws java.io.IOException
java.io.IOException
protected boolean fill()
                throws java.io.IOException
java.io.IOException| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||