Build 1.0_r1(from source)

org.apache.http.impl.io
Class AbstractMessageParser

java.lang.Object
  extended by 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.


Field Summary
protected  LineParser lineParser
           
 
Constructor Summary
AbstractMessageParser(SessionInputBuffer buffer, LineParser parser, HttpParams params)
           
 
Method Summary
 HttpMessage parse()
           
protected abstract  HttpMessage parseHead(SessionInputBuffer sessionBuffer)
           
static Header[] parseHeaders(SessionInputBuffer inbuffer, int maxHeaderCount, int maxLineLen, LineParser parser)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineParser

protected final LineParser lineParser
Constructor Detail

AbstractMessageParser

public AbstractMessageParser(SessionInputBuffer buffer,
                             LineParser parser,
                             HttpParams params)
Method Detail

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 buffer
maxHeaderCount - 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

Build 1.0_r1(from source)

Please submit a feedback, bug or feature