org.apache.http.impl.io
Class AbstractMessageParser
java.lang.Object
org.apache.http.impl.io.AbstractMessageParser
- All Implemented Interfaces:
- HttpMessageParser
- Direct Known Subclasses:
- HttpRequestParser, HttpResponseParser
public abstract class AbstractMessageParser
- extends java.lang.Object
- implements HttpMessageParser
Message parser base class.
- Author:
- Michael Becke, Oleg Kalnichevski
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,
java.io.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
java.io.IOException
parseHead
protected abstract HttpMessage parseHead(SessionInputBuffer sessionBuffer)
throws java.io.IOException,
HttpException,
ParseException
- Throws:
java.io.IOException
HttpException
ParseException
parse
public HttpMessage parse()
throws java.io.IOException,
HttpException
- Specified by:
parse
in interface HttpMessageParser
- Throws:
java.io.IOException
HttpException
Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.