|
Apache Tomcat 7.0.4 | ||||||||
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.InternalAprInputBuffer
public class InternalAprInputBuffer
Implementation of InputBuffer which provides HTTP request header parsing as well as transfer decoding.
Nested Class Summary | |
---|---|
protected class |
InternalAprInputBuffer.SocketInputBuffer
This class is an input buffer which will read its data from an input stream. |
Field Summary | |
---|---|
protected ByteBuffer |
bbuf
Direct byte buffer used to perform actual reading. |
protected long |
socket
Underlying socket. |
Fields inherited from class org.apache.coyote.http11.AbstractInputBuffer |
---|
activeFilters, buf, end, filterLibrary, headers, inputStream, inputStreamInputBuffer, lastActiveFilter, lastValid, parsingHeader, pos, request, sm, swallowInput |
Constructor Summary | |
---|---|
InternalAprInputBuffer(Request request,
int headerBufferSize)
Alternate constructor. |
Method Summary | |
---|---|
int |
available()
Available bytes (note that due to encoding, this may not correspond ) |
int |
doRead(ByteChunk chunk,
Request req)
Read some bytes. |
protected boolean |
fill()
Fill the internal buffer using data from the underlying input stream. |
protected boolean |
fill(boolean block)
|
long |
getSocket()
Get the underlying socket input stream. |
boolean |
parseHeader()
Parse an HTTP header. |
boolean |
parseHeaders()
Parse the HTTP headers. |
boolean |
parseRequestLine(boolean useAvailableData)
Read the request line. |
void |
recycle()
Recycle the input buffer. |
void |
setSocket(long socket)
Set the underlying socket. |
Methods inherited from class org.apache.coyote.http11.AbstractInputBuffer |
---|
addActiveFilter, addFilter, clearFilters, endRequest, getFilters, getInputStream, nextRequest, setInputStream, setSwallowInput |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ByteBuffer bbuf
protected long socket
Constructor Detail |
---|
public InternalAprInputBuffer(Request request, int headerBufferSize)
Method Detail |
---|
public void setSocket(long socket)
public long getSocket()
public void recycle()
recycle
in class AbstractInputBuffer
public boolean parseRequestLine(boolean useAvailableData) throws IOException
parseRequestLine
in class AbstractInputBuffer
IOException
- If an exception occurs during the underlying socket
read operations, or if the given buffer is not big enough to accommodate
the whole line.public boolean parseHeaders() throws IOException
parseHeaders
in class AbstractInputBuffer
IOException
public boolean parseHeader() throws IOException
IOException
public int available()
public int doRead(ByteChunk chunk, Request req) throws IOException
doRead
in interface InputBuffer
doRead
in class AbstractInputBuffer
IOException
protected boolean fill(boolean block) throws IOException
fill
in class AbstractInputBuffer
IOException
protected boolean fill() throws IOException
IOException
|
Apache Tomcat 7.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |