|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ning.http.client.Headers
public class Headers
Constructor Summary | |
---|---|
Headers()
|
|
Headers(Headers src)
|
|
Headers(Map<String,Collection<String>> src)
|
Method Summary | |
---|---|
Headers |
add(String name,
Collection<String> values)
Adds the specified header values and returns this headers object. |
Headers |
add(String name,
String... values)
Adds the specified header and returns this headers object. |
Headers |
addAll(Headers src)
Adds all headers from the given headers object to this object and returns this headers object. |
Headers |
addAll(Map<String,Collection<String>> src)
Adds all headers from the given map to this object and returns this headers object. |
boolean |
equals(Object obj)
|
String |
getFirstHeaderValue(String name)
Returns the (first) value of the header of the given name. |
Set<String> |
getHeaderNames()
Returns the names of all defined headers. |
String |
getHeaderValue(String name)
Returns the value of the header of the given name. |
List<String> |
getHeaderValues(String name)
Returns all defined values for the specified header. |
int |
hashCode()
|
boolean |
isDefined(String name)
Determines whether the indicated header is defined. |
Iterator<Map.Entry<String,List<String>>> |
iterator()
|
Headers |
remove(String name)
Removes the specified header if present and returns this headers object. |
Headers |
removeAll(Collection<String> names)
Removed all specified headers in this object and returns this headers object. |
Headers |
removeAll(String... names)
Removed all specified headers in this object and returns this headers object. |
Headers |
replace(String name,
Collection<String> values)
Replaces the indicated header with the given values. |
Headers |
replace(String name,
String... values)
Replaces the indicated header with the given values. |
Headers |
replaceAll(Headers src)
Replaces all headers present the given headers object in this object and returns this headers object. |
Headers |
replaceAll(Map<String,Collection<String>> src)
Replaces all headers from the given map in this object and returns this headers object. |
String |
toString()
|
static Headers |
unmodifiableHeaders(Headers headers)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Headers()
public Headers(Headers src)
public Headers(Map<String,Collection<String>> src)
Method Detail |
---|
public static Headers unmodifiableHeaders(Headers headers)
public Headers add(String name, String... values)
name
- The header namevalues
- The header value; if null then this method has no effect. Use the empty string to
generate an empty header value
public Headers add(String name, Collection<String> values)
name
- The header namevalues
- The header values; if null then this method has no effect. Use an empty collection
to generate an empty header value
public Headers addAll(Headers src)
src
- The source headers object
public Headers addAll(Map<String,Collection<String>> src)
src
- The source map of headers
public Headers replace(String name, String... values)
name
- The header namevalues
- The new header values
public Headers replace(String name, Collection<String> values)
name
- The header namevalues
- The new header value
public Headers replaceAll(Headers src)
src
- The source headers object
public Headers replaceAll(Map<String,Collection<String>> src)
src
- The source map of headers
public Iterator<Map.Entry<String,List<String>>> iterator()
iterator
in interface Iterable<Map.Entry<String,List<String>>>
public Set<String> getHeaderNames()
public boolean isDefined(String name)
name
- The header name
true
if the header is definedpublic String getFirstHeaderValue(String name)
name
- The header's name
null
if this header is not definedpublic String getHeaderValue(String name)
name
- The header's name
null
if this header is not definedpublic List<String> getHeaderValues(String name)
name
- The header name
null
if the header is not definedpublic Headers remove(String name)
name
- The header name
public Headers removeAll(String... names)
names
- The header names
public Headers removeAll(Collection<String> names)
names
- The header names
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |