- All Implemented Interfaces:
Serializable,Comparable<Header>,Constable
Enumeration of all headers as defined in
RFC 2616.- Since:
- 2.1.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic HeaderAttempts to find a HTTP header by it's standard textual definition which may differ from value value returned byEnum.name.final byte[]getBytes()Returns the byte representation of this header encoded usingISO-8859-1.final intReturns the length this header encoded usingISO-8859-1.final StringReturns the lower-caseStringrepresentation of this header.final byte[]Returns the lower-case byte representation of this header encoded usingISO-8859-1.final byte[]Returns the US-ASCII encoded byte representation of thisHeader.final StringtoString()Returns the name of the header properly hyphenated if necessary.static HeaderReturns the enum constant of this class with the specified name.static Header[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Accept
-
AcceptCharset
-
AcceptEncoding
-
AcceptRanges
-
Age
-
Allow
-
Authorization
-
CacheControl
-
Cookie
-
Connection
-
ContentDisposition
-
ContentEncoding
-
ContentLanguage
-
ContentLength
-
ContentLocation
-
ContentMD5
-
ContentRange
-
ContentType
-
Date
-
ETag
-
Expect
-
Expires
-
From
-
Host
-
IfMatch
-
IfModifiedSince
-
IfNoneMatch
-
IfRange
-
IfUnmodifiedSince
-
KeepAlive
-
LastModified
-
Location
-
MaxForwards
-
Pragma
-
ProxyAuthenticate
-
ProxyAuthorization
-
ProxyConnection
-
Range
-
Referer
-
RetryAfter
-
Server
-
SetCookie
-
TE
-
Trailer
-
TransferEncoding
-
Upgrade
-
UserAgent
-
Vary
-
Via
-
Warnings
-
WWWAuthenticate
-
XPoweredBy
-
HTTP2Settings
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getBytes
public final byte[] getBytes()Returns the byte representation of this header encoded using
ISO-8859-1.- Returns:
- the byte representation of this header encoded using
ISO-8859-1.
-
getLowerCase
Returns the lower-case
Stringrepresentation of this header.- Returns:
- the lower-case
Stringrepresentation of this header
-
getLowerCaseBytes
public final byte[] getLowerCaseBytes()Returns the lower-case byte representation of this header encoded using
ISO-8859-1.- Returns:
- the lower-case byte representation of this header encoded using
ISO-8859-1.
-
getLength
public final int getLength()Returns the length this header encoded using
ISO-8859-1.- Returns:
- the length this header encoded using
ISO-8859-1.
-
toString
Returns the name of the header properly hyphenated if necessary.
-
toByteArray
public final byte[] toByteArray()Returns the US-ASCII encoded byte representation of this
Header.- Returns:
- the US-ASCII encoded byte representation of this
Header.
-
find
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.- Parameters:
name- the name of theHeaderto attempt to find.- Returns:
- the
Headerfor the specified text representation. If noHeadermatches or if the specified argument isnull/zero-length, this method returns null.
-