public class InternalInputBuffer extends AbstractInputBuffer<Socket>
Modifier and Type | Class and Description |
---|---|
protected class |
InternalInputBuffer.InputStreamInputBuffer
This class is an input buffer which will read its data from an input
stream.
|
activeFilters, buf, end, filterLibrary, headers, HTTP_TOKEN_CHAR, inputStreamInputBuffer, lastActiveFilter, lastValid, parsingHeader, pos, request, sm, swallowInput
Constructor and Description |
---|
InternalInputBuffer(Request request,
int headerBufferSize)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
Data is always available for blocking IO (if you wait long enough) so
return a value of 1.
|
protected boolean |
fill()
Fill the internal buffer using data from the underlying input stream.
|
protected boolean |
fill(boolean block)
Attempts to read some data into the input buffer.
|
protected Log |
getLog() |
protected void |
init(SocketWrapper<Socket> socketWrapper,
AbstractEndpoint<Socket> endpoint) |
boolean |
parseHeaders()
Parse the HTTP headers.
|
boolean |
parseRequestLine(boolean useAvailableDataOnly)
Read the request line.
|
void |
recycle()
Recycle the input buffer.
|
addActiveFilter, addFilter, doRead, endRequest, getFilters, isBlocking, isFinished, nextRequest, setSwallowInput
public InternalInputBuffer(Request request, int headerBufferSize)
public int available()
available
in class AbstractInputBuffer<Socket>
public boolean parseRequestLine(boolean useAvailableDataOnly) throws IOException
parseRequestLine
in class AbstractInputBuffer<Socket>
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<Socket>
IOException
public void recycle()
AbstractInputBuffer
recycle
in class AbstractInputBuffer<Socket>
protected void init(SocketWrapper<Socket> socketWrapper, AbstractEndpoint<Socket> endpoint) throws IOException
init
in class AbstractInputBuffer<Socket>
IOException
protected boolean fill() throws IOException
IOException
protected boolean fill(boolean block) throws IOException
AbstractInputBuffer
fill
in class AbstractInputBuffer<Socket>
true
if more data was added to the input buffer
otherwise false
IOException
protected final Log getLog()
getLog
in class AbstractInputBuffer<Socket>
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.