org.milyn.javabean.decoders
Class DateDecoder
java.lang.Object
org.milyn.javabean.decoders.LocaleAwareDateDecoder
org.milyn.javabean.decoders.DateDecoder
- All Implemented Interfaces:
- ContentHandler, DataDecoder
- Direct Known Subclasses:
- SqlDateDecoder, SqlTimeDecoder
@DecodeType(value=java.util.Date.class)
public class DateDecoder
- extends LocaleAwareDateDecoder
- implements DataDecoder
Date data decoder.
Decodes the supplied string into a Date value
based on the supplied "format" parameter, or the default (see below).
The default date format used is "yyyy-MM-dd'T'HH:mm:ss" (see SimpleDateFormat).
This format is based on the ISO 8601
standard as used by the XML Schema type "dateTime".
This decoder is synchronized on its underlying SimpleDateFormat instance.
- Author:
- tom.fennelly@gmail.com
- See Also:
LocaleAwareDateDecoder
|
Method Summary |
Object |
decode(String data)
Decode the supplied String data into a new Object data instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateDecoder
public DateDecoder()
decode
public Object decode(String data)
throws DataDecodeException
- Description copied from interface:
DataDecoder
- Decode the supplied String data into a new Object data instance.
- Specified by:
decode in interface DataDecoder
- Parameters:
data - Data to be decoded.
- Returns:
- Decoded data Object.
- Throws:
DataDecodeException - Error decoding data.
Copyright © 2008. All Rights Reserved.