jp.bitmeister.asn1.type.useful
Class UTCTime
java.lang.Object
jp.bitmeister.asn1.type.ASN1Type
jp.bitmeister.asn1.type.PrimitiveType<byte[]>
jp.bitmeister.asn1.type.builtin.OCTET_STRING
jp.bitmeister.asn1.type.StringType
jp.bitmeister.asn1.type.TimeType
jp.bitmeister.asn1.type.useful.UTCTime
- All Implemented Interfaces:
- java.lang.Cloneable, Concatenatable<OCTET_STRING>, SizeCountable
public class UTCTime
- extends TimeType
Represents ASN.1 'UTCTime' type.
An instance of this class represents a 'UTCTime' type data, and contains an
array of byte
value. The value represents a character sequence of
calendar date with 2-digits year, a time of day with second precision and a
time differential from GMT.
Time differential is represented with a 4 digits number that follows plus(+)
or minus(-) sign, or a character 'Z' means GMT. If time differential is
omitted, the time zone is local time.
- Author:
- WATANABE, Jun.
Constructor Summary |
UTCTime()
Instantiates an empty UTCTime . |
UTCTime(java.util.Date value)
Instantiates a UTCTime and initialize it with the Date
value. |
UTCTime(java.lang.String value)
Instantiates a UTCTime and initialize it with the String
value. |
Method Summary |
java.text.DateFormat |
form()
Returns the DateFormat used for formatting the date and time. |
protected java.util.Date |
parseDate(java.lang.String time,
java.lang.String differential)
Parses and converts the strings represents a set of date, time and time
defferential to a Date . |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
UTCTime
public UTCTime()
- Instantiates an empty
UTCTime
.
UTCTime
public UTCTime(java.lang.String value)
- Instantiates a
UTCTime
and initialize it with the String
value.
- Parameters:
value
- The value assigned to the instance.
UTCTime
public UTCTime(java.util.Date value)
- Instantiates a
UTCTime
and initialize it with the Date
value.
- Parameters:
value
- The value assigned to the instance.
parseDate
protected java.util.Date parseDate(java.lang.String time,
java.lang.String differential)
- Description copied from class:
TimeType
- Parses and converts the strings represents a set of date, time and time
defferential to a
Date
.
- Specified by:
parseDate
in class TimeType
- Parameters:
time
- The String
represents a set of date.differential
- The String
represents a time differential.
- Returns:
- A
Date
object that converted from the time and the
differential.
form
public java.text.DateFormat form()
- Description copied from class:
TimeType
- Returns the
DateFormat
used for formatting the date and time.
- Specified by:
form
in class TimeType
- Returns:
- The date format.