Class DateParser

java.lang.Object
jakarta.xml.bind.annotation.adapters.XmlAdapter<String,Date>
eu.europa.esig.dss.jaxb.parsers.DateParser

public final class DateParser extends jakarta.xml.bind.annotation.adapters.XmlAdapter<String,Date>
Parses a date
  • Constructor Details

    • DateParser

      public DateParser()
      Default constructor
  • Method Details

    • unmarshal

      public Date unmarshal(String s) throws Exception
      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

      public String marshal(Date date) throws Exception
      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