Package org.glassfish.grizzly.http.util
Enum Header
- java.lang.Object
-
- java.lang.Enum<Header>
-
- org.glassfish.grizzly.http.util.Header
-
- All Implemented Interfaces:
Serializable,Comparable<Header>
public enum Header extends Enum<Header>
Enumeration of all headers as defined inRFC 2616.- Since:
- 2.1.2
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Headerfind(String name)Attempts to find a HTTP header by it's standard textual definition which may differ from value value returned byEnum.name.byte[]getBytes()Returns the byte representation of this header encoded usingISO-8859-1.intgetLength()Returns the length this header encoded usingISO-8859-1.StringgetLowerCase()Returns the lower-caseStringrepresentation of this header.byte[]getLowerCaseBytes()Returns the lower-case byte representation of this header encoded usingISO-8859-1.byte[]toByteArray()Returns the US-ASCII encoded byte representation of thisHeader.StringtoString()Returns the name of the header properly hyphenated if necessary.static HeadervalueOf(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.
-
-
-
Enum Constant Detail
-
Accept
public static final Header Accept
-
AcceptCharset
public static final Header AcceptCharset
-
AcceptEncoding
public static final Header AcceptEncoding
-
AcceptRanges
public static final Header AcceptRanges
-
Age
public static final Header Age
-
Allow
public static final Header Allow
-
Authorization
public static final Header Authorization
-
CacheControl
public static final Header CacheControl
-
Cookie
public static final Header Cookie
-
Connection
public static final Header Connection
-
ContentDisposition
public static final Header ContentDisposition
-
ContentEncoding
public static final Header ContentEncoding
-
ContentLanguage
public static final Header ContentLanguage
-
ContentLength
public static final Header ContentLength
-
ContentLocation
public static final Header ContentLocation
-
ContentMD5
public static final Header ContentMD5
-
ContentRange
public static final Header ContentRange
-
ContentType
public static final Header ContentType
-
Date
public static final Header Date
-
ETag
public static final Header ETag
-
Expect
public static final Header Expect
-
Expires
public static final Header Expires
-
From
public static final Header From
-
Host
public static final Header Host
-
IfMatch
public static final Header IfMatch
-
IfModifiedSince
public static final Header IfModifiedSince
-
IfNoneMatch
public static final Header IfNoneMatch
-
IfRange
public static final Header IfRange
-
IfUnmodifiedSince
public static final Header IfUnmodifiedSince
-
KeepAlive
public static final Header KeepAlive
-
LastModified
public static final Header LastModified
-
Location
public static final Header Location
-
MaxForwards
public static final Header MaxForwards
-
Pragma
public static final Header Pragma
-
ProxyAuthenticate
public static final Header ProxyAuthenticate
-
ProxyAuthorization
public static final Header ProxyAuthorization
-
ProxyConnection
public static final Header ProxyConnection
-
Range
public static final Header Range
-
Referer
public static final Header Referer
-
RetryAfter
public static final Header RetryAfter
-
Server
public static final Header Server
-
SetCookie
public static final Header SetCookie
-
TE
public static final Header TE
-
Trailer
public static final Header Trailer
-
TransferEncoding
public static final Header TransferEncoding
-
Upgrade
public static final Header Upgrade
-
UserAgent
public static final Header UserAgent
-
Vary
public static final Header Vary
-
Via
public static final Header Via
-
Warnings
public static final Header Warnings
-
WWWAuthenticate
public static final Header WWWAuthenticate
-
XPoweredBy
public static final Header XPoweredBy
-
HTTP2Settings
public static final Header HTTP2Settings
-
-
Method Detail
-
values
public static Header[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Header c : Header.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Header valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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
public final String 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
public final String 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
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.- 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.
-
-