|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.JabberUtil
public class JabberUtil
This class contains convenience methods to work with the Jabber protocol. These may involve features such as parsing date and time according to JEP-0082 (Date and Time Profile).
Constructor Summary | |
---|---|
JabberUtil()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JabberUtil()
Method Detail |
---|
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 string
ParseException
public static java.util.Calendar parseDateTime(java.lang.String dateTime) throws ParseException
dateTime
- the datetime string to be parsed
ParseException
- when parsing problems occurpublic static java.lang.String formatDateTime(java.util.Calendar cal)
cal
- the calendar instance to convert into a string
public static java.util.TimeZone parseTimeZone(java.lang.String tz)
tz
- the timezone string, or can be null
public static Element parseXmlStringToDOM(java.lang.String xmlStr) throws java.io.IOException, JDOMException
java.io.IOException
JDOMException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |