Class MetaDataUtils
- java.lang.Object
-
- org.jivesoftware.smackx.workgroup.util.MetaDataUtils
-
public class MetaDataUtils extends 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 Map<String,List<String>>
parseMetaData(XmlPullParser parser)
Parses any available meta-data and returns it as a Map of String name/value pairs.static String
serializeMetaData(Map<String,List<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 Map<String,List<String>> parseMetaData(XmlPullParser parser) throws XmlPullParserException, 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.IOException
- if an error occurs while parsing the XML.
-
-