org.apache.james.mime4j.util
public class StringArrayMap extends Object implements Serializable
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 and Description |
---|
StringArrayMap() |
Modifier and Type | Method and Description |
---|---|
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.
|
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)
public Enumeration<String> getValueEnum(String pName)
public Enumeration<String> getNames()
getNameArray()
public Map<String,String[]> getMap()
public String[] getNameArray()
getNames()
Copyright © 2004–2014 The Apache Software Foundation. All rights reserved.