gnu.inet.http
Class Headers
- java.util.Map
public class Headers
extends java.lang.Object
implements java.util.Map
A collection of HTTP header names and associated values.
Retrieval of values is case insensitive. An iteration over the keys
returns the header names in the order they were received.
- Chris Burdess
void | clear()
|
boolean | containsKey(java.lang.Object key)
|
boolean | containsValue(java.lang.Object value)
|
java.util.Set | entrySet()
|
boolean | equals(java.lang.Object other)
|
java.lang.Object | get(java.lang.Object key)
|
java.util.Date | getDateValue(java.lang.String header) - Returns the value of the specified header as a date,
or
null if the header is not present or not a date.
|
int | getIntValue(java.lang.String header) - Returns the value of the specified header as an integer,
or -1 if the header is not present or not an integer.
|
java.lang.String | getValue(java.lang.String header) - Returns the value of the specified header as a string.
|
int | hashCode()
|
boolean | isEmpty()
|
java.util.Set | keySet()
|
void | parse(java.io.InputStream in) - Parse the specified input stream, adding headers to this collection.
|
java.lang.Object | put(java.lang.Object key, java.lang.Object value)
|
void | putAll(java.util.Map t)
|
java.lang.Object | remove(java.lang.Object key)
|
int | size()
|
java.util.Collection | values()
|
containsKey
public boolean containsKey(java.lang.Object key)
containsValue
public boolean containsValue(java.lang.Object value)
entrySet
public java.util.Set entrySet()
equals
public boolean equals(java.lang.Object other)
get
public java.lang.Object get(java.lang.Object key)
getDateValue
public java.util.Date getDateValue(java.lang.String header)
Returns the value of the specified header as a date,
or null
if the header is not present or not a date.
getIntValue
public int getIntValue(java.lang.String header)
Returns the value of the specified header as an integer,
or -1 if the header is not present or not an integer.
getValue
public java.lang.String getValue(java.lang.String header)
Returns the value of the specified header as a string.
hashCode
public int hashCode()
isEmpty
public boolean isEmpty()
keySet
public java.util.Set keySet()
parse
public void parse(java.io.InputStream in)
throws java.io.IOException
Parse the specified input stream, adding headers to this collection.
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
putAll
public void putAll(java.util.Map t)
remove
public java.lang.Object remove(java.lang.Object key)
values
public java.util.Collection values()
© Copyright 2003 The Free Software Foundation,
all rights reserved