org.glassfish.grizzly.http.util
Enum Header

java.lang.Object
  extended by java.lang.Enum<Header>
      extended by org.glassfish.grizzly.http.util.Header
All Implemented Interfaces:
Serializable, Comparable<Header>

public enum Header
extends Enum<Header>

Enumeration of all headers as defined in RFC 2616.

Since:
2.1.2

Enum Constant Summary
Accept
           
AcceptCharset
           
AcceptEncoding
           
AcceptRanges
           
Age
           
Allow
           
Authorization
           
CacheControl
           
Connection
           
ContentDisposition
           
ContentEncoding
           
ContentLanguage
           
ContentLength
           
ContentLocation
           
ContentMD5
           
ContentRange
           
ContentType
           
Cookie
           
Date
           
ETag
           
Expect
           
Expires
           
From
           
Host
           
IfMatch
           
IfModifiedSince
           
IfNoneMatch
           
IfRange
           
IfUnmodifiedSince
           
LastModified
           
Location
           
MaxForwards
           
Pragma
           
ProxyAuthenticate
           
ProxyAuthorization
           
ProxyConnection
           
Range
           
Referer
           
RetryAfter
           
Server
           
SetCookie
           
TE
           
Trailer
           
TransferEncoding
           
Upgrade
           
UserAgent
           
Vary
           
Via
           
Warnings
           
WWWAuthenticate
           
XPoweredBy
           
 
Method Summary
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.
 byte[] getLowerCaseBytes()
           Returns the lower-case byte representation of this header encoded using ISO-8859-1.
 Buffer toBuffer()
           Returns a Buffer wrapping 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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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

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
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 name
NullPointerException - 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.

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.

toString

public final String toString()

Returns the name of the header properly hyphenated if necessary.

Overrides:
toString in class Enum<Header>
Returns:
Returns the name of the header properly hyphenated if necessary.

toBuffer

public final Buffer toBuffer()

Returns a Buffer wrapping the US-ASCII encoded byte representation of this Header.

Returns:
a Buffer wrapping 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 the Header to attempt to find.
Returns:
the Header for the specified text representation. If no Header matches or if the specified argument is null/zero-length, this method returns null.


Copyright © 2012 Oracle Corporation. All Rights Reserved.