pasn
Class ASN1UTCTime

java.lang.Object
  extended by pasn.ASN1Object
      extended by pasn.ASN1SimpleObject<ASN1TimeValue>
          extended by pasn.ASN1Time
              extended by pasn.ASN1UTCTime
All Implemented Interfaces:
ASN1DefaultValuedObject, ASN1EncodingSpecificObject, ASN1GenericObject, ASN1PrimitiveObject<ASN1TimeValue>, ASN1Resetable

public class ASN1UTCTime
extends ASN1Time

An ASN.1 UTCTime represents date and time, 2-digit year.

UTC time formats are:

        yymmddhhmmZ             (format 0)
        yymmddhhmmssZ           (format 1)
        yymmddhhmm+hhmm         (format 2)
        yymmddhhmm-hhmm         (format 2)
        yymmddhhmmss+hhmm       (format 3)
        yymmddhhmmss-hhmm       (format 3)
        yymmddhhmmss.s..Z       (format 4)
        yymmddhhmmss.s..+hhmm   (format 5)
        yymmddhhmmss.s..-hhmm   (format 5)
 
where:

Z indicates that local time is Zulu (GMT)

+ indicates that local time is later than GMT and - it is earlier than GMT

hhmm is the absolute difference from GMT in hours (first 2 digits) and minutes (last 2 digits)

Author:
N. Cottin - http://www.ncottin.net
See Also:
ASN1GeneralizedTime

Constructor Summary
ASN1UTCTime()
           Creates an empty time object.
 
Method Summary
 java.lang.String getASN1Name()
           
 void setValue(java.lang.String value)
          Initializes this ASN.1 time object with a string representation of a date and time
 
Methods inherited from class pasn.ASN1Time
createValue, getAppropriateTime, getAppropriateTime, getAppropriateTime, getTimeFormat, hasDefaultValue, hasValue, isTimeValidated, isValueDefault, reset, setDecodedValue, setTimeFormat, setTimeValidation, setValue, toString, toString, validateConstraints
 
Methods inherited from class pasn.ASN1SimpleObject
equals, getDefaultValue, getValue, getValueOrDefault, hasValueOrDefault, setDefaultValue, setValue
 
Methods inherited from class pasn.ASN1Object
getAsnClass, getSpecificEncoding, getSpecificEncoding, getType, hasSpecificEncodings, setSpecificEncoding
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface pasn.ASN1GenericObject
getAsnClass, getType
 
Methods inherited from interface pasn.ASN1EncodingSpecificObject
getSpecificEncoding, hasSpecificEncodings
 

Constructor Detail

ASN1UTCTime

public ASN1UTCTime()

Creates an empty time object. This object is not initialized with a time value

Method Detail

getASN1Name

public final java.lang.String getASN1Name()

setValue

public final void setValue(java.lang.String value)
                    throws ASN1FormatException,
                           ASN1ConstraintException
Description copied from class: ASN1Time
Initializes this ASN.1 time object with a string representation of a date and time

Specified by:
setValue in class ASN1Time
Parameters:
value - A time value. A null or empty ("") value leads to assign the current time value using local time zone
Throws:
ASN1FormatException - The given value does not correspond to a valid time representation
ASN1ConstraintException