public class PackedDate extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private byte[] |
time |
Constructor and Description |
---|
PackedDate(byte[] bytes) |
PackedDate(java.util.Date time)
Base constructor from a java.util.date object.
|
PackedDate(java.util.Date time,
java.util.Locale locale)
Base constructor from a java.util.date object.
|
PackedDate(java.lang.String time) |
Modifier and Type | Method and Description |
---|---|
private byte[] |
convert(java.lang.String sTime) |
boolean |
equals(java.lang.Object o) |
java.util.Date |
getDate()
return the time as a date based on whatever a 2 digit year will return.
|
byte[] |
getEncoding() |
int |
hashCode() |
java.lang.String |
toString() |
private byte[] time
public PackedDate(java.lang.String time)
public PackedDate(java.util.Date time)
time
- a date object representing the time of interest.public PackedDate(java.util.Date time, java.util.Locale locale)
time
- a date object representing the time of interest.locale
- an appropriate Locale for producing an ASN.1 GeneralizedTime value.PackedDate(byte[] bytes)
private byte[] convert(java.lang.String sTime)
public java.util.Date getDate() throws java.text.ParseException
java.text.ParseException
- if the date string cannot be parsed.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public byte[] getEncoding()