public class InternalAprInputBuffer extends AbstractInputBuffer<Long>
Modifier and Type | Class and Description |
---|---|
protected class |
InternalAprInputBuffer.SocketInputBuffer
This class is an input buffer which will read its data from an input
stream.
|
activeFilters, buf, chr, end, filterLibrary, headers, httpParser, inputStreamInputBuffer, lastActiveFilter, lastValid, parsingHeader, pos, prevChr, rejectIllegalHeaderName, request, sm, swallowInput
Constructor and Description |
---|
InternalAprInputBuffer(Request request,
int headerBufferSize,
boolean rejectIllegalHeader,
HttpParser httpParser)
Alternate constructor.
|
Modifier and Type | Method and Description |
---|---|
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) |
protected void |
init(SocketWrapper<Long> socketWrapper,
AbstractEndpoint<Long> endpoint) |
boolean |
parseHeaders()
Parse the HTTP headers.
|
boolean |
parseRequestLine(boolean useAvailableData)
Read the request line.
|
void |
recycle()
Recycle the input buffer.
|
addActiveFilter, addFilter, available, endRequest, getFilters, nextRequest, parseInvalid, setSwallowInput
public InternalAprInputBuffer(Request request, int headerBufferSize, boolean rejectIllegalHeader, HttpParser httpParser)
public void recycle()
recycle
in class AbstractInputBuffer<Long>
public boolean parseRequestLine(boolean useAvailableData) throws IOException
parseRequestLine
in class AbstractInputBuffer<Long>
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<Long>
IOException
public int doRead(ByteChunk chunk, Request req) throws IOException
doRead
in interface InputBuffer
doRead
in class AbstractInputBuffer<Long>
chunk
- The buffer to read data into.req
- The associated requestIOException
- If an I/O error occurs reading from the input streamprotected void init(SocketWrapper<Long> socketWrapper, AbstractEndpoint<Long> endpoint) throws IOException
init
in class AbstractInputBuffer<Long>
IOException
protected boolean fill(boolean block) throws IOException
fill
in class AbstractInputBuffer<Long>
IOException
protected boolean fill() throws IOException
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.