Enum Class Header

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

public enum Header extends Enum<Header>
Enumeration of all headers as defined in RFC 2616.
Since:
2.1.2
  • Enum Constant Details

    • 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
    • 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 Details

    • values

      public static Header[] 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

      public static Header valueOf(String name)
      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 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.
    • getLowerCase

      public final String getLowerCase()

      Returns the lower-case String representation of this header.

      Returns:
      the lower-case String representation 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.

      Overrides:
      toString in class Enum<Header>
      Returns:
      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 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.