|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.ispsoft.jaxme.util.Format
A set of utility methods for working with java.text.Format objects.
Constructor Summary | |
Format()
|
Method Summary | |
static java.lang.String |
formatDate(java.text.DateFormat pFormat,
java.util.Date pDate)
Takes an instance of java.util.Date and converts it to a String using the given instance of DateFormat. |
static java.lang.Object |
parseByAbstractFormat(java.lang.String pValue,
java.text.Format pFormat)
Invokes the given formatters parseObject() method
and returns the value. |
static java.util.Date |
parseByDateFormat(java.lang.String pValue,
java.text.DateFormat pFormat)
Parses the given String using the given DateFormat. |
static java.lang.Number |
parseByNumberFormat(java.lang.String pValue,
java.text.NumberFormat pFormat)
Parses the given String using the given NumberFormat. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Format()
Method Detail |
public static java.util.Date parseByDateFormat(java.lang.String pValue, java.text.DateFormat pFormat) throws org.xml.sax.SAXException
Parses the given String using the given DateFormat. A possible ParseException is catched and thrown by encapsulating it within a SAXException.
org.xml.sax.SAXException
public static java.lang.Number parseByNumberFormat(java.lang.String pValue, java.text.NumberFormat pFormat) throws org.xml.sax.SAXException
Parses the given String using the given NumberFormat. A possible ParseException is catched and thrown by encapsulating it within a SAXException.
org.xml.sax.SAXException
public static java.lang.Object parseByAbstractFormat(java.lang.String pValue, java.text.Format pFormat) throws org.xml.sax.SAXException
Invokes the given formatters parseObject()
method
and returns the value. A possible ParseException is converted into
a SAXException and rethrown.
org.xml.sax.SAXException
public static java.lang.String formatDate(java.text.DateFormat pFormat, java.util.Date pDate)
Takes an instance of java.util.Date and converts it to a String using the given instance of DateFormat. Synchronizes on the DateFormat instance, in order to avoid problems in a multithreaded environment.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |