public class Asn1UTCTime extends Asn1AbstractTime
| Modifier and Type | Field and Description | 
|---|---|
static Asn1Tag | 
TAG
The TAG constant describes the universal tag for
 this data type (UNIVERSAL 23). 
 | 
Apr, April, Aug, August, day, Dec, December, derRules, diffHour, diffMin, Feb, February, hour, Jan, January, Jul, July, Jun, June, Mar, March, May, minute, month, Nov, November, Oct, October, parsed, secFraction, second, Sep, September, utcFlag, yearBITSPERCHAR_A, BITSPERCHAR_UmStringBuffer, valueBIT_STRING, BMPString, BOOLEAN, DATE, DATE_TIME, DURATION, ENUMERATED, EOC, EXTERNAL, GeneralString, GeneralTime, GraphicString, IA5String, INTEGER, mNonParameterizedTypeName, NULL, NumericString, OBJECT_IDENTIFIER, ObjectDescriptor, OCTET_STRING, OID_IRI, OpenType, PrintableString, REAL, RELATIVE_OID_IRI, RelativeOID, SEQUENCE, SET, T61String, TeletexString, TIME, TIME_OF_DAY, UniversalString, UTCTime, UTF8String, VideotexString, VisibleString| Constructor and Description | 
|---|
Asn1UTCTime()
The default constructor creates an empty time string object. 
 | 
Asn1UTCTime(boolean useDerRules)
This constructor creates an empty time string object and allows
 DER encoding rules to be specified. 
 | 
Asn1UTCTime(java.lang.String data)
This version of the constructor can be used to set the string
 value member variable to the given time string. 
 | 
Asn1UTCTime(java.lang.String data,
           boolean useDerRules)
This version of the constructor can be used to set the string
 value member variable to the given time string and
 specify DER encoding rules be used to construct the string. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
clear()
Clears out time string. 
 | 
protected boolean | 
compileString()
Compiles new time string according to X.680 (clause 42) and ISO 8601. 
 | 
void | 
decode(Asn1BerDecodeBuffer buffer,
      boolean explicit,
      int implicitLength)
This method decodes an ASN.1 string value including the
 UNIVERSAL tag value and length if explicit tagging is specified. 
 | 
int | 
encode(Asn1BerEncodeBuffer buffer,
      boolean explicit)
This method encodes an ASN.1 string type. 
 | 
void | 
encode(Asn1BerOutputStream out,
      boolean explicit)
This method encodes and writes to the stream an ASN.1 UTC time string
 value including the UNIVERSAL tag value and length if explicit tagging
 is specified. 
 | 
boolean | 
equals(java.lang.String s)
This method compares this object with a String value. 
 | 
java.lang.String | 
getFraction()
This method always returns zero for this class. 
 | 
protected void | 
init()  | 
void | 
parseString(java.lang.String string)
This method parses passed time string. 
 | 
void | 
setFraction(java.lang.String fraction)
This method is not supported for UTC time. 
 | 
void | 
setTime(java.util.Calendar time)
This method converts the java.util.Calendar value to time string. 
 | 
void | 
setYear(int year)
This method sets the year component of the time value. 
 | 
charAt, compareTo, decode, decode, decodeXML, encode, encode, encode, encode, encode, encodeXER, encodeXMLData, equals, getDay, getDiff, getDiffHour, getDiffMinute, getHour, getMinute, getMonth, getSecond, getTime, getUTC, getYear, parseInt, parseXmlString, putInteger, putInteger, safeParseString, setDay, setDER, setDiff, setDiff, setDiffHour, setHour, setMinute, setMonth, setSecond, setUTCdecode, decode, decode, decode, decode, encode, encode, encode, encode, encode, encode, encode, skipdecode, decode, decode, decodeByteToChar, decodeInternal, decodeXER, encode, encode, encode, encode, encode, getAsn1TypeName, getLength, hashCode, toString, validate_setKey, _setLicLocation, clone, decode, decode, decode, decode, decode, decode, decode, decode, decode, encode, encode, encode, encode, encodeAsOpenType, equals, getNonParameterizedTypeName, getTypeName, indent, indent, isOpenType, matchTag, matchTag, pdiag, print, print, print, setNonParameterizedTypeName, setOpenTypepublic static final Asn1Tag TAG
public Asn1UTCTime()
public Asn1UTCTime(boolean useDerRules)
useDerRules - 'true' if time string should be encoded with DER/PER.public Asn1UTCTime(java.lang.String data)
data - Character string containing UTC time value
                   to be set.  The format of the string is
                   YYMMDDHH[MM](Z|(+|-)HH(MM))public Asn1UTCTime(java.lang.String data,
                   boolean useDerRules)
data - Character string containing UTC time value
                   to be set.  The format of the string is
                   YYMMDDHH[MM](Z|(+|-)HH(MM))useDerRules - 'true' if time string should be encoded with DER/PER.protected void init()
init in class Asn1AbstractTimepublic boolean equals(java.lang.String s)
equals in class Asn1AbstractTimes - public void decode(Asn1BerDecodeBuffer buffer, boolean explicit, int implicitLength) throws Asn1Exception, java.io.IOException
decode in interface Asn1TypeIFdecode in class Asn1Typebuffer - Decode message buffer objectexplicit - Flag indicating element is explicitly taggedimplicitLength - Length of contents if implicitAsn1Exceptionjava.io.IOExceptionpublic int encode(Asn1BerEncodeBuffer buffer, boolean explicit) throws Asn1Exception
encode in interface Asn1TypeIFencode in class Asn1Typebuffer - Encode message buffer objectexplicit - Flag indicating explicit tagging should be doneAsn1Exceptionpublic void clear()
clear in class Asn1AbstractTimepublic void setYear(int year)
             throws Asn1Exception
setYear in class Asn1AbstractTimeyear - Year component (full 4 digits).Asn1Exception - Thrown, if operation is failed.public void setFraction(java.lang.String fraction)
                 throws Asn1Exception
setFraction in class Asn1AbstractTimefraction - Any integer value.Asn1Exception - Always is thrown.public java.lang.String getFraction()
                             throws Asn1Exception
getFraction in class Asn1AbstractTimeAsn1Exception - Thrown, if operation is failed.public void setTime(java.util.Calendar time)
             throws Asn1Exception
setTime in class Asn1AbstractTimetime - The calendar time value.Asn1Exception - Thrown, if operation is failed.public void parseString(java.lang.String string)
                 throws Asn1Exception
parseString in class Asn1AbstractTimestring - Character string containing UTC time value
                   to be parsed.  The format of the string is
                   YYMMDDHH[MM](Z|(+|-)HH(MM))Asn1Exception - Thrown if format of string is not correct.protected boolean compileString()
                         throws Asn1Exception
compileString in class Asn1AbstractTimeAsn1Exception - Thrown, if operation is failed.public void encode(Asn1BerOutputStream out, boolean explicit) throws Asn1Exception, java.io.IOException
encode in interface Asn1TypeIFencode in class Asn1Typeout - BER Output Stream objectexplicit - Flag indicating explicit tagging should be donejava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1Exception - Thrown, if operation is failed.