|
Apache JAMES Mime4j 0.6-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.james.mime4j.util.StringArrayMap
public class StringArrayMap
An object, which may be used to implement header, or parameter maps. The maps keys are the header or parameter names. The maps values are strings (single value), lists, or arrays.
Note that this class is not directly used anywhere in Mime4j.
Instead a user might choose to use it instead of Header
and Field
in a custom ContentHandler
implementation.
See also MIME4j-24.
Constructor Summary | |
---|---|
StringArrayMap()
|
Method Summary | |
---|---|
protected void |
addMapValue(Map<String,Object> pMap,
String pName,
String pValue)
Adds a value to the given map. |
void |
addValue(String pName,
String pValue)
Adds a new name/value pair. |
static Map<String,String[]> |
asMap(Map<String,Object> pMap)
Converts the given map into a string array map: The map values are string arrays. |
static String |
asString(Object pValue)
Converts the given object into a string. |
static String[] |
asStringArray(Object pValue)
Converts the given object into a string array. |
static Enumeration<String> |
asStringEnum(Object pValue)
Converts the given object into a string enumeration. |
protected String |
convertName(String pName)
Lower cases the given name. |
Map<String,String[]> |
getMap()
Returns an unmodifiable map of name/value pairs. |
String[] |
getNameArray()
Returns the set of registered names. |
Enumeration<String> |
getNames()
Returns the set of registered names as an enumeration. |
String |
getValue(String pName)
Returns the requested value. |
Enumeration<String> |
getValueEnum(String pName)
Returns the requested values as an enumeration. |
String[] |
getValues(String pName)
Returns the requested values as a string array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringArrayMap()
Method Detail |
---|
public static String asString(Object pValue)
Converts the given object into a string. The object may be either of:
public static String[] asStringArray(Object pValue)
Converts the given object into a string array. The object may be either of:
public static Enumeration<String> asStringEnum(Object pValue)
Converts the given object into a string enumeration. The object may be either of:
public static Map<String,String[]> asMap(Map<String,Object> pMap)
protected void addMapValue(Map<String,Object> pMap, String pName, String pValue)
protected String convertName(String pName)
public String getValue(String pName)
public String[] getValues(String pName)
public Enumeration<String> getValueEnum(String pName)
public Enumeration<String> getNames()
getNameArray()
public Map<String,String[]> getMap()
public void addValue(String pName, String pValue)
public String[] getNameArray()
getNames()
|
Apache JAMES Mime4j 0.6-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |