public enum Header extends Enum<Header>
RFC 2616
.Modifier and Type | Method and Description |
---|---|
static Header |
find(String name)
Attempts to find a HTTP header by it's standard textual definition which
may differ from value value returned by
Enum.name . |
byte[] |
getBytes()
Returns the byte representation of this header encoded using
ISO-8859-1 . |
int |
getLength()
Returns the length this header encoded using
ISO-8859-1 . |
byte[] |
getLowerCaseBytes()
Returns the lower-case byte representation of this header encoded using
ISO-8859-1 . |
byte[] |
toByteArray()
Returns the US-ASCII encoded byte representation of this
Header . |
String |
toString()
Returns the name of the header properly hyphenated if necessary.
|
static Header |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Header[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Header Accept
public static final Header AcceptCharset
public static final Header AcceptEncoding
public static final Header AcceptRanges
public static final Header Age
public static final Header Allow
public static final Header Authorization
public static final Header CacheControl
public static final Header Cookie
public static final Header Connection
public static final Header ContentDisposition
public static final Header ContentEncoding
public static final Header ContentLanguage
public static final Header ContentLength
public static final Header ContentLocation
public static final Header ContentMD5
public static final Header ContentRange
public static final Header ContentType
public static final Header Date
public static final Header ETag
public static final Header Expect
public static final Header Expires
public static final Header From
public static final Header Host
public static final Header IfMatch
public static final Header IfModifiedSince
public static final Header IfNoneMatch
public static final Header IfRange
public static final Header IfUnmodifiedSince
public static final Header KeepAlive
public static final Header LastModified
public static final Header Location
public static final Header MaxForwards
public static final Header Pragma
public static final Header ProxyAuthenticate
public static final Header ProxyAuthorization
public static final Header ProxyConnection
public static final Header Range
public static final Header Referer
public static final Header RetryAfter
public static final Header Server
public static final Header SetCookie
public static final Header TE
public static final Header Trailer
public static final Header TransferEncoding
public static final Header Upgrade
public static final Header UserAgent
public static final Header Vary
public static final Header Via
public static final Header Warnings
public static final Header WWWAuthenticate
public static final Header XPoweredBy
public static Header[] values()
for (Header c : Header.values()) System.out.println(c);
public static Header valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final byte[] getBytes()
Returns the byte representation of this header encoded using
ISO-8859-1
.
ISO-8859-1
.public final byte[] getLowerCaseBytes()
Returns the lower-case byte representation of this header encoded using
ISO-8859-1
.
ISO-8859-1
.public final int getLength()
Returns the length this header encoded using ISO-8859-1
.
ISO-8859-1
.public final String toString()
Returns the name of the header properly hyphenated if necessary.
public final byte[] toByteArray()
Returns the US-ASCII encoded byte representation of this Header
.
Header
.public static Header find(String name)
Attempts to find a HTTP header by it's standard textual definition which
may differ from value value returned by Enum.name
. Note that this
search is case insensitive.
name
- the name of the Header
to attempt to find.Header
for the specified text representation.
If no Header
matches or if the specified argument is
null/zero-length
, this method returns null.Copyright © 2014 Oracle Corporation. All rights reserved.