Class MetaDataUtils
- java.lang.Object
-
- org.jivesoftware.smackx.workgroup.util.MetaDataUtils
-
public class MetaDataUtils extends java.lang.Object
Utility class for meta-data parsing and writing.
-
-
Constructor Summary
Constructors Constructor Description MetaDataUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.util.List<java.lang.String>>
parseMetaData(XmlPullParser parser)
Parses any available meta-data and returns it as a Map of String name/value pairs.static java.lang.String
serializeMetaData(java.util.Map<java.lang.String,java.util.List<java.lang.String>> metaData)
Serializes a Map of String name/value pairs into the meta-data XML format.
-
-
-
Constructor Detail
-
MetaDataUtils
public MetaDataUtils()
-
-
Method Detail
-
parseMetaData
public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> parseMetaData(XmlPullParser parser) throws XmlPullParserException, java.io.IOException
Parses any available meta-data and returns it as a Map of String name/value pairs. The parser must be positioned at an opening meta-data tag, or the an empty map will be returned.- Parameters:
parser
- the XML parser positioned at an opening meta-data tag.- Returns:
- the meta-data.
- Throws:
XmlPullParserException
- if an error occurs while parsing the XML.java.io.IOException
- if an error occurs while parsing the XML.
-
serializeMetaData
public static java.lang.String serializeMetaData(java.util.Map<java.lang.String,java.util.List<java.lang.String>> metaData)
Serializes a Map of String name/value pairs into the meta-data XML format.- Parameters:
metaData
- the Map of meta-data as Map<String, List<String>>- Returns:
- the meta-data values in XML form.
-
-