Class PackedDate

java.lang.Object
org.bouncycastle.asn1.eac.PackedDate

public class PackedDate extends Object
EAC encoding date object
  • Constructor Details

    • PackedDate

      public PackedDate(String time)
    • PackedDate

      public PackedDate(Date time)
      Base constructor from a java.util.date object.
      Parameters:
      time - a date object representing the time of interest.
    • PackedDate

      public PackedDate(Date time, Locale locale)
      Base constructor from a java.util.date object. You may need to use this constructor if the default locale doesn't use a Gregorian calender so that the PackedDate produced is compatible with other ASN.1 implementations.
      Parameters:
      time - a date object representing the time of interest.
      locale - an appropriate Locale for producing an ASN.1 GeneralizedTime value.
  • Method Details

    • getDate

      public Date getDate() throws ParseException
      return the time as a date based on whatever a 2 digit year will return. For standardised processing use getAdjustedDate().
      Returns:
      the resulting date
      Throws:
      ParseException - if the date string cannot be parsed.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getEncoding

      public byte[] getEncoding()