pasn
Class ASN1GeneralizedTime

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

public class ASN1GeneralizedTime
extends ASN1Time

An ASN.1 GeneralizedTime is an extension to UTC time to allow the whole year representation (and not last 2 digits). It must be preferred to UTC time to express post 2050 dates.

Generalized time format are:

        yyyymmddhhmmZ             (format 0)
        yyyymmddhhmmssZ           (format 1)
        yyyymmddhhmm+hhmm         (format 2)
        yyyymmddhhmm-hhmm         (format 2)
        yyyymmddhhmmss+hhmm       (format 3)
        yyyymmddhhmmss-hhmm       (format 3)
        yyyymmddhhmmss.s..Z       (format 4)
        yyyymmddhhmmss.s..+hhmm   (format 5)
        yyyymmddhhmmss.s..-hhmm   (format 5)
 

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

Constructor Summary
ASN1GeneralizedTime()
           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

ASN1GeneralizedTime

public ASN1GeneralizedTime()

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