public class InternalInputBuffer extends AbstractInputBuffer<java.net.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, httpParser, inputStreamInputBuffer, lastActiveFilter, lastValid, parsingHeader, pos, rejectIllegalHeaderName, request, sm, swallowInput
Constructor and Description |
---|
InternalInputBuffer(Request request,
int headerBufferSize,
boolean rejectIllegalHeaderName,
HttpParser httpParser)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
available(boolean read)
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<java.net.Socket> socketWrapper,
AbstractEndpoint<java.net.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, boolean rejectIllegalHeaderName, HttpParser httpParser)
public int available(boolean read)
available
in class AbstractInputBuffer<java.net.Socket>
public boolean parseRequestLine(boolean useAvailableDataOnly) throws java.io.IOException
parseRequestLine
in class AbstractInputBuffer<java.net.Socket>
java.io.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 java.io.IOException
parseHeaders
in class AbstractInputBuffer<java.net.Socket>
java.io.IOException
public void recycle()
AbstractInputBuffer
recycle
in class AbstractInputBuffer<java.net.Socket>
protected void init(SocketWrapper<java.net.Socket> socketWrapper, AbstractEndpoint<java.net.Socket> endpoint) throws java.io.IOException
init
in class AbstractInputBuffer<java.net.Socket>
java.io.IOException
protected boolean fill() throws java.io.IOException
java.io.IOException
protected boolean fill(boolean block) throws java.io.IOException
AbstractInputBuffer
fill
in class AbstractInputBuffer<java.net.Socket>
true
if more data was added to the input buffer
otherwise false
java.io.IOException
protected final Log getLog()
getLog
in class AbstractInputBuffer<java.net.Socket>
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.