|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.sentinel.json.java.JSONDateHandlerJava
public class JSONDateHandlerJava
Implementation of JSONDateHandler for use in a Java environment (as opposed to GWT or something like it). This is implemented as a singleton; use getInstance() to get the instance.
JSONDateHandler
Field Summary |
---|
Fields inherited from interface com.novell.sentinel.json.JSONDateHandler |
---|
ISO_DATETIME_FORMAT |
Method Summary | |
---|---|
String |
format(Date date)
Serialize a date to the format specified by ISO_DATETIME_FORMAT . |
static JSONDateHandlerJava |
getInstance()
Return the instance of the implementation to use. |
Date |
parse(String dateString)
Parse a string that should be serialized date the format specified by ISO_DATETIME_FORMAT . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static JSONDateHandlerJava getInstance()
public Date parse(String dateString) throws ParseException
JSONDateHandler
ISO_DATETIME_FORMAT
.
parse
in interface JSONDateHandler
dateString
- The input.
ParseException
- If the input is not in the correct format.JSONDateHandler.ISO_DATETIME_FORMAT
public String format(Date date)
JSONDateHandler
ISO_DATETIME_FORMAT
.
format
in interface JSONDateHandler
date
- The input.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |