com.go.trove.net
Class HttpHeaderMap
java.lang.Object
|
+--com.go.trove.net.HttpHeaderMap
- All Implemented Interfaces:
- java.util.Map, java.io.Serializable
- public class HttpHeaderMap
- extends java.lang.Object
- implements java.util.Map, java.io.Serializable
- Version:
- 12 , 01/07/16
- Author:
- Brian S O'Neill
- See Also:
- Serialized Form
| Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
|
Method Summary |
void |
add(java.lang.Object key,
java.lang.Object value)
Add more than one value associated with the given key. |
void |
appendTo(CharToByteBuffer buffer)
|
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Set |
entrySet()
|
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
get(java.lang.Object key)
Returns the first value associated with the given key. |
java.util.List |
getAll(java.lang.Object key)
Returns all the values associated with the given key. |
java.util.Date |
getDate(java.lang.Object key)
|
java.lang.Integer |
getInteger(java.lang.Object key)
|
java.lang.String |
getString(java.lang.Object key)
|
int |
hashCode()
|
boolean |
isEmpty()
|
java.util.Set |
keySet()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
May return a list if the key previously mapped to multiple values. |
void |
putAll(java.util.Map map)
|
void |
readFrom(java.io.InputStream in)
Read and parse headers from the given InputStream until a blank line is
reached. |
void |
readFrom(java.io.InputStream in,
byte[] buffer)
Read and parse headers from the given InputStream until a blank line is
reached. |
void |
readFrom(java.io.InputStream in,
char[] buffer)
Read and parse headers from the given InputStream until a blank line is
reached. |
java.lang.Object |
remove(java.lang.Object key)
|
int |
size()
|
java.lang.String |
toString()
|
java.util.Collection |
values()
|
void |
writeTo(java.io.OutputStream out)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
HttpHeaderMap
public HttpHeaderMap()
readFrom
public void readFrom(java.io.InputStream in)
throws java.io.IOException
- Read and parse headers from the given InputStream until a blank line is
reached. Except for Cookies, all other headers that contain multiple
fields delimited by commas are parsed into multiple headers.
- Parameters:
in - stream to read from
readFrom
public void readFrom(java.io.InputStream in,
byte[] buffer)
throws java.io.IOException
- Read and parse headers from the given InputStream until a blank line is
reached. Except for Cookies, all other headers that contain multiple
fields delimited by commas are parsed into multiple headers.
- Parameters:
in - stream to read frombuffer - temporary buffer to use
readFrom
public void readFrom(java.io.InputStream in,
char[] buffer)
throws java.io.IOException
- Read and parse headers from the given InputStream until a blank line is
reached. Except for Cookies, all other headers that contain multiple
fields delimited by commas are parsed into multiple headers.
- Parameters:
in - stream to read frombuffer - temporary buffer to use
writeTo
public void writeTo(java.io.OutputStream out)
throws java.io.IOException
appendTo
public void appendTo(CharToByteBuffer buffer)
throws java.io.IOException
size
public int size()
- Specified by:
size in interface java.util.Map
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface java.util.Map
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey in interface java.util.Map
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue in interface java.util.Map
get
public java.lang.Object get(java.lang.Object key)
- Returns the first value associated with the given key.
- Specified by:
get in interface java.util.Map
getString
public java.lang.String getString(java.lang.Object key)
getInteger
public java.lang.Integer getInteger(java.lang.Object key)
getDate
public java.util.Date getDate(java.lang.Object key)
getAll
public java.util.List getAll(java.lang.Object key)
- Returns all the values associated with the given key. Changes to the
returned list will be reflected in this map.
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- May return a list if the key previously mapped to multiple values.
- Specified by:
put in interface java.util.Map
add
public void add(java.lang.Object key,
java.lang.Object value)
- Add more than one value associated with the given key.
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove in interface java.util.Map
putAll
public void putAll(java.util.Map map)
- Specified by:
putAll in interface java.util.Map
clear
public void clear()
- Specified by:
clear in interface java.util.Map
keySet
public java.util.Set keySet()
- Specified by:
keySet in interface java.util.Map
values
public java.util.Collection values()
- Specified by:
values in interface java.util.Map
entrySet
public java.util.Set entrySet()
- Specified by:
entrySet in interface java.util.Map
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals in interface java.util.Map- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface java.util.Map- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object