public final class DateParser
extends jakarta.xml.bind.annotation.adapters.XmlAdapter<String,Date>
Parses a date
-
Constructor Summary
Constructors
-
Method Summary
Prints the date according to the format "yyyy-MM-dd'T'HH:mm:ss'Z'"
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DateParser
public DateParser()
Default constructor
-
Method Details
-
unmarshal
Parses the date
- Specified by:
unmarshal
in class jakarta.xml.bind.annotation.adapters.XmlAdapter<String,Date>
- Parameters:
s
- String
date in the format "yyyy-MM-dd'T'HH:mm:ss'Z'"
- Returns:
Date
, null if not able to parse
- Throws:
Exception
-
marshal
Prints the date according to the format "yyyy-MM-dd'T'HH:mm:ss'Z'"
- Specified by:
marshal
in class jakarta.xml.bind.annotation.adapters.XmlAdapter<String,Date>
- Parameters:
date
- Date
- Returns:
String
- Throws:
Exception