@DecodeType(value=javax.xml.datatype.XMLGregorianCalendar.class) public class XMLGregorianCalendarDecoder extends DateDecoder
XMLGregorianCalendar
data decoder.
Decodes the supplied string into a XMLGregorianCalendar
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.DataDecoder.Factory
decoder, DEFAULT_DATE_FORMAT, format, FORMAT, LOCALE_COUNTRY_CODE, LOCALE_LANGUAGE_CODE, VERIFY_LOCALE
LOCALE
Constructor and Description |
---|
XMLGregorianCalendarDecoder() |
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.
|
setConfiguration
getConfiguration, getLocale, getLocale, isLocalInstalled
public Object decode(String data) throws DataDecodeException
DataDecoder
decode
in interface DataDecoder
decode
in class DateDecoder
data
- Data to be decoded.DataDecodeException
- Error decoding data.public String encode(Object date) throws DataDecodeException
DataEncoder
encode
in interface DataEncoder
encode
in class DateDecoder
date
- The object to be encoded.DataDecodeException
- Error encoding object.Copyright © 2020. All rights reserved.