org.jwall.web.http
Class HttpHeader

java.lang.Object
  extended by org.jwall.web.http.HttpHeader

public class HttpHeader
extends Object


Field Summary
static String ALLOW
           
static String CACHE_CONTROL
           
static boolean CASE_INSENSITIVE_HEADERS
           
static String CONNECTION
           
static String CONTENT_ENCODING
           
static String CONTENT_LANGUAGE
           
static String CONTENT_LENGTH
           
static String CONTENT_LOCATION
           
static String CONTENT_MD5
           
static String CONTENT_RANGE
           
static String CONTENT_TYPE
           
static char CR
           
static String CRLF
           
static ByteBuffer CRLF_BUF
           
static String DATE
           
static String EXPIRES
           
static String HEADER_FIELD_SEPARATOR
           
static String LAST_MODIFIED
           
static char LF
           
static String PRAGMA
           
static String SP
           
static String TRAILER
           
static String TRANSFER_ENCODING
           
static String UPGRADE
           
static String VIA
           
static String WARNING
           
 
Constructor Summary
HttpHeader(String head)
           
 
Method Summary
 String debugString()
           
 Integer getContentLength()
          Returns the value (Integer) of the Content-Length header.
 String getHeader()
           
 String getHeader(String hn)
           
 Set<String> getHeaderNames()
           
 boolean isChunked()
          This will return, if the header indicates a chunked transfer encoding.
 boolean isConnectionCloseSet()
           
 Map<String,String> parseHeader(String s)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CR

public static final char CR
See Also:
Constant Field Values

LF

public static final char LF
See Also:
Constant Field Values

SP

public static final String SP
See Also:
Constant Field Values

CRLF

public static final String CRLF
See Also:
Constant Field Values

HEADER_FIELD_SEPARATOR

public static final String HEADER_FIELD_SEPARATOR
See Also:
Constant Field Values

CRLF_BUF

public static final ByteBuffer CRLF_BUF

CASE_INSENSITIVE_HEADERS

public static boolean CASE_INSENSITIVE_HEADERS

CONNECTION

public static final String CONNECTION

DATE

public static final String DATE

PRAGMA

public static final String PRAGMA

TRAILER

public static final String TRAILER

TRANSFER_ENCODING

public static final String TRANSFER_ENCODING

UPGRADE

public static final String UPGRADE

VIA

public static final String VIA

WARNING

public static final String WARNING

CACHE_CONTROL

public static final String CACHE_CONTROL

ALLOW

public static final String ALLOW

CONTENT_ENCODING

public static final String CONTENT_ENCODING

CONTENT_LANGUAGE

public static final String CONTENT_LANGUAGE

CONTENT_LENGTH

public static final String CONTENT_LENGTH

CONTENT_LOCATION

public static final String CONTENT_LOCATION

CONTENT_MD5

public static final String CONTENT_MD5

CONTENT_RANGE

public static final String CONTENT_RANGE

CONTENT_TYPE

public static final String CONTENT_TYPE

EXPIRES

public static final String EXPIRES

LAST_MODIFIED

public static final String LAST_MODIFIED
Constructor Detail

HttpHeader

public HttpHeader(String head)
           throws MessageFormatException
Throws:
MessageFormatException
Method Detail

parseHeader

public Map<String,String> parseHeader(String s)
                               throws MessageFormatException
Throws:
MessageFormatException

getHeader

public String getHeader()

getHeader

public String getHeader(String hn)

getHeaderNames

public Set<String> getHeaderNames()

debugString

public String debugString()

getContentLength

public Integer getContentLength()
Returns the value (Integer) of the Content-Length header. If the header is not present, a value of -1 will be returned.

Returns:
The content-length value of -1 of no such header is present.

isChunked

public boolean isChunked()
This will return, if the header indicates a chunked transfer encoding.

Returns:

isConnectionCloseSet

public boolean isConnectionCloseSet()


Copyright © 2012 jwall.org. All Rights Reserved.