com.sapportals.wcm.util.urlcontentaccess

Class HeaderFields

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by com.sapportals.wcm.util.urlcontentaccess.HeaderFields
All Implemented Interfaces:
Serializable, Cloneable, Map

public class HeaderFields
extends HashMap

A simple adapter for the HashMap to store header fields for a http request/response.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
HeaderFields()
          Create an empty map of header fields.
HeaderFields(HashMap map)
          Create a prefilled map of header fields from a given map.
 
Method Summary
 String getHeaderField(String name)
          Get the value for a given header field from the map.
 Iterator getIterator()
          Get the iterator for the header fields' keySet.
 void setHeaderField(String name, String value)
          Put a name,value pair to the map of header fields.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

HeaderFields

public HeaderFields()
Create an empty map of header fields.


HeaderFields

public HeaderFields(HashMap map)
Create a prefilled map of header fields from a given map. The given map must contain String keys and values only (all other entries, with either key or value not being a String, will be ignored)!

Method Detail

getIterator

public Iterator getIterator()
Get the iterator for the header fields' keySet.

Returns:
the iterator of for the header fields' keySet

setHeaderField

public void setHeaderField(String name,
                           String value)
Put a name,value pair to the map of header fields.

Parameters:
name - the name of the header field to set or add
value - the value for the header field

getHeaderField

public String getHeaderField(String name)
Get the value for a given header field from the map.

Parameters:
name - the name of the header field to get
Returns:
the value for the header field (might be null)
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice