org.apache.coyote.http11
public class InternalInputBuffer extends Object implements InputBuffer
| Nested Class Summary | |
|---|---|
| protected class | InternalInputBuffer.InputStreamInputBuffer
This class is an input buffer which will read its data from an input
stream. |
| Field Summary | |
|---|---|
| protected InputFilter[] | activeFilters
Active filters (in order). |
| protected byte[] | buf
Pointer to the current read buffer. |
| protected int | end
Pos of the end of the header in the buffer, which is also the
start of the body. |
| protected InputFilter[] | filterLibrary
Filter library.
|
| protected MimeHeaders | headers
Headers of the associated request. |
| protected InputStream | inputStream
Underlying input stream. |
| protected InputBuffer | inputStreamInputBuffer
Underlying input buffer. |
| protected int | lastActiveFilter
Index of the last active filter. |
| protected int | lastValid
Last valid byte. |
| protected boolean | parsingHeader
State. |
| protected int | pos
Position in the buffer. |
| protected Request | request
Associated Coyote request. |
| protected static StringManager | sm
The string manager for this package. |
| protected boolean | swallowInput
Swallow input ? |
| 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. |
| 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(InputStream inputStream)
Set the underlying socket input stream. |
| void | setSwallowInput(boolean swallowInput)
Set the swallow input flag. |
Throws: IOException an undelying I/O error occured
Returns: false if at end of stream
Returns: false after reading a blank line (which indicates that the HTTP header parsing is done
Throws: 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.