org.apache.http.impl.io
Class AbstractMessageParser
java.lang.Object
org.apache.http.impl.io.AbstractMessageParser
- All Implemented Interfaces:
- HttpMessageParser
- Direct Known Subclasses:
- DefaultResponseParser, HttpRequestParser, HttpResponseParser
public abstract class AbstractMessageParser
- extends Object
- implements HttpMessageParser
Message parser base class.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lineParser
protected final LineParser lineParser
AbstractMessageParser
public AbstractMessageParser(SessionInputBuffer buffer,
LineParser parser,
HttpParams params)
parseHeaders
public static Header[] parseHeaders(SessionInputBuffer inbuffer,
int maxHeaderCount,
int maxLineLen,
LineParser parser)
throws HttpException,
IOException
- Parses HTTP headers from the data receiver stream according to the generic
format as given in Section 3.1 of RFC 822, RFC-2616 Section 4 and 19.3.
- Parameters:
inbuffer - Session input buffermaxHeaderCount - maximum number of headers allowed. If the number
of headers received from the data stream exceeds maxCount value, an
IOException will be thrown. Setting this parameter to a negative value
or zero will disable the check.maxLineLen - maximum number of characters for a header line,
including the continuation lines
- Returns:
- array of HTTP headers
- Throws:
HttpException
IOException
parseHead
protected abstract HttpMessage parseHead(SessionInputBuffer sessionBuffer)
throws IOException,
HttpException,
ParseException
- Throws:
IOException
HttpException
ParseException
parse
public HttpMessage parse()
throws IOException,
HttpException
- Specified by:
parse in interface HttpMessageParser
- Throws:
IOException
HttpException
Please submit a feedback, bug or feature