@DecodeType(value=java.util.Date.class) public class DateDecoder extends LocaleAwareDateDecoder implements DataDecoder, DataEncoder
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.LocaleAwareDateDecoder,
Serialized FormDataDecoder.Factorydecoder, DEFAULT_DATE_FORMAT, format, FORMAT, LOCALE_COUNTRY_CODE, LOCALE_LANGUAGE_CODE, VERIFY_LOCALELOCALE| Constructor and Description |
|---|
DateDecoder() |
| Modifier and Type | Method and Description |
|---|---|
Object |
decode(String data)
Decode the supplied String data into a new Object data instance.
|
String |
encode(Object date)
Encode an object to a string.
|
setConfigurationgetConfiguration, getLocale, getLocale, isLocalInstalledpublic Object decode(String data) throws DataDecodeException
DataDecoderdecode in interface DataDecoderdata - Data to be decoded.DataDecodeException - Error decoding data.public String encode(Object date) throws DataDecodeException
DataEncoderencode in interface DataEncoderdate - The object to be encoded.DataDecodeException - Error encoding object.Copyright © 2020. All rights reserved.