|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.Header
public class Header
Represents an HTTP header field.
The HTTP header fields follow the same generic format as that given in Section 3.1 of RFC 822. Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive. The field value MAY be preceded by any amount of LWS, though a single SP is preferred.
message-header = field-name ":" [ field-value ] field-name = token field-value = *( field-content | LWS ) field-content = <the OCTETs making up the field-value and consisting of either *TEXT or combinations of token, separators, and quoted-string>
Nested Class Summary | |
---|---|
(package private) static class |
Header.BufferedHeader
This class represents a raw HTTP header whose content is parsed 'on demand' only when the header value needs to be consumed |
Constructor Summary | |
---|---|
Header(java.lang.String name,
java.lang.String value)
Constructor with name and value |
Method Summary | |
---|---|
static void |
format(CharArrayBuffer buffer,
Header header)
Formats a Header into a header line. |
static java.lang.String |
format(Header header)
|
HeaderElement[] |
getElements()
Returns an array of HeaderElement s constructed from my value. |
java.lang.String |
getName()
Returns the header name. |
java.lang.String |
getValue()
Returns the header value. |
static Header[] |
parseAll(HttpDataReceiver datareceiver)
|
java.lang.String |
toString()
Returns a String representation of the header. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Header(java.lang.String name, java.lang.String value)
name
- the header namevalue
- the header valueMethod Detail |
---|
public java.lang.String getName()
public java.lang.String getValue()
public java.lang.String toString()
String
representation of the header.
toString
in class java.lang.Object
public HeaderElement[] getElements()
HeaderElement
s constructed from my value.
HeaderElement.parseAll(org.apache.http.io.CharArrayBuffer, int, int)
public static void format(CharArrayBuffer buffer, Header header)
header
is
directly appended to buffer
; no newline characters are
inserted (folding).
buffer
- the buffer to append toheader
- the header to formatpublic static java.lang.String format(Header header)
format(CharArrayBuffer, Header)
public static Header[] parseAll(HttpDataReceiver datareceiver) throws HttpException, java.io.IOException
HttpException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |