org.apache.http.util
Class HeaderUtils

java.lang.Object
  extended byorg.apache.http.util.HeaderUtils

public final class HeaderUtils
extends java.lang.Object

A utility class for processing HTTP headers.

Author:
Michael Becke, Oleg Kalnichevski

Method Summary
static Header[] parseHeaders(HttpDataReceiver datareceiver)
           
static Header[] parseHeaders(HttpDataReceiver datareceiver, int maxCount)
          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
 

Method Detail

parseHeaders

public static Header[] parseHeaders(HttpDataReceiver datareceiver,
                                    int maxCount)
                             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:
datareceiver - HTTP data receiver
maxCount - 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.
Returns:
array of HTTP headers
Throws:
HttpException
java.io.IOException

parseHeaders

public static Header[] parseHeaders(HttpDataReceiver datareceiver)
                             throws HttpException,
                                    java.io.IOException
Throws:
HttpException
java.io.IOException


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.