public class JabberUtil
extends java.lang.Object
| Constructor and Description |
|---|
JabberUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
formatDateTime(java.util.Calendar cal)
This formats the date to a string that is compliant with the Jabber dateTime format.
|
static java.util.Calendar |
parseDate(java.lang.String date)
parses the a date string according to JEP-0082.
|
static java.util.Calendar |
parseDateTime(java.lang.String dateTime)
This method parses the date and the time out of the string.
|
static java.util.Calendar |
parseTime(java.lang.String time)
parses the time string according to JEP-0082.
|
static java.util.TimeZone |
parseTimeZone(java.lang.String tz)
Parses the timezone from a given string.
|
static Element |
parseXmlStringToDOM(java.lang.String xmlStr)
parses the XML string into a JDOM dom element.
|
public static java.util.Calendar parseDate(java.lang.String date)
throws ParseException
date - the date in the format specified by the JEP.ParseException - when parsing problems occurpublic static java.util.Calendar parseTime(java.lang.String time)
throws ParseException
time - the time stringParseExceptionpublic static java.util.Calendar parseDateTime(java.lang.String dateTime)
throws ParseException
dateTime - the datetime string to be parsedParseException - when parsing problems occurpublic static java.lang.String formatDateTime(java.util.Calendar cal)
cal - the calendar instance to convert into a stringpublic static java.util.TimeZone parseTimeZone(java.lang.String tz)
tz - the timezone string, or can be nullpublic static Element parseXmlStringToDOM(java.lang.String xmlStr)
throws java.io.IOException,
JDOMException
java.io.IOExceptionJDOMExceptionCopyright © 2001-2005 Echomine. All Rights Reserved.