|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.objsys.asn1j.runtime.Asn1Type
com.objsys.asn1j.runtime.Asn1CharString
com.objsys.asn1j.runtime.Asn18BitCharString
com.objsys.asn1j.runtime.Asn1Time
com.objsys.asn1j.runtime.Asn1GeneralizedTime
This is a container class for holding the components of an ASN.1 generalized time string value.
| Field Summary | |
static Asn1Tag |
TAG
The TAG constant describes the universal tag for this data type (UNIVERSAL 24). |
| Fields inherited from class com.objsys.asn1j.runtime.Asn1Time |
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, year |
| Fields inherited from class com.objsys.asn1j.runtime.Asn18BitCharString |
BITSPERCHAR_A, BITSPERCHAR_U |
| Fields inherited from class com.objsys.asn1j.runtime.Asn1CharString |
mStringBuffer, value |
| Fields inherited from class com.objsys.asn1j.runtime.Asn1Type |
BIT_STRING, BMPString, BOOLEAN, ENUMERATED, EOC, EXTERNAL, GeneralString, GeneralTime, GraphicString, IA5String, INTEGER, NULL, NumericString, OBJECT_IDENTIFIER, ObjectDescriptor, OCTET_STRING, OpenType, PrintableString, REAL, RelativeOID, SEQUENCE, SET, T61String, TeletexString, UniversalString, UTCTime, UTF8String, VideotexString, VisibleString |
| Constructor Summary | |
Asn1GeneralizedTime()
The default constructor creates an empty time string object. |
|
Asn1GeneralizedTime(boolean useDerRules)
This constructor creates an empty time string object and allows DER encoding rules to be specified. |
|
Asn1GeneralizedTime(java.lang.String data)
This version of the constructor can be used to set the string value member variable to the given time string. |
|
Asn1GeneralizedTime(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. |
|
| Method Summary | |
protected boolean |
compileString()
Compiles new time string accoring X.680 (clause 41) 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 stream an ASN.1 generalized time string value including the UNIVERSAL tag value and length if explicit tagging is specified. |
void |
encode(Asn1XerEncoder buffer,
java.lang.String elemName,
java.lang.String attribute)
This method encodes ASN.1 UTC Time string into xsd:dateTime format with element & attribute name tag according to the XML Encoding as specified in the XML schema standard(asn2xsd). |
void |
encodeXMLData(Asn1XerEncoder buffer)
This method creates XML TimeString from the Asn1 GeneralizedTime String. |
int |
getCentury()
This method returns the century part (first two digits) of the year component of the time value. |
void |
parseString(java.lang.String string)
This method parses the given time string value. |
void |
setCentury(int century)
This method sets the century part (first two digits) of the year component of the time value. |
| Methods inherited from class com.objsys.asn1j.runtime.Asn1Time |
charAt, clear, compareTo, decode, decode, decodeXML, encode, encode, encode, encode, equals, getDay, getDiff, getDiffHour, getDiffMinute, getFraction, getHour, getMinute, getMonth, getSecond, getTime, getUTC, getYear, init, parseInt, parseXmlString, putInteger, putInteger, safeParseString, setDay, setDER, setDiff, setDiff, setDiffHour, setFraction, setHour, setMinute, setMonth, setSecond, setTime, setUTC, setYear |
| Methods inherited from class com.objsys.asn1j.runtime.Asn18BitCharString |
decode, decode, encode, encode, encode, encode |
| Methods inherited from class com.objsys.asn1j.runtime.Asn1CharString |
decode, decode, decodeXER, encode, encode, encode, equals, getLength, toString |
| Methods inherited from class com.objsys.asn1j.runtime.Asn1Type |
clone, decode, decode, decode, encode, encode, encode, getTypeName, indent, isOpenType, matchTag, matchTag, matchTypeName, pdiag, print, setKey, setOpenType |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Asn1Tag TAG
| Constructor Detail |
public Asn1GeneralizedTime()
public Asn1GeneralizedTime(boolean useDerRules)
useDerRules - 'true' if time string should be encoded with DER/PER.public Asn1GeneralizedTime(java.lang.String data)
data - Character string
public Asn1GeneralizedTime(java.lang.String data,
boolean useDerRules)
data - Character stringuseDerRules - 'true' if time string should be encoded with DER/PER.| Method Detail |
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 implicit
Asn1Exception
java.io.IOException
public 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 done
Asn1Exception
public int getCentury()
throws Asn1Exception
Asn1Exception - Thrown, if operation is failed.
public void setCentury(int century)
throws Asn1Exception
century - Century part (first two digits) of the year component.
Asn1Exception - Thrown, if operation is failed.
public void parseString(java.lang.String string)
throws Asn1Exception
parseString in class Asn1Timestring - The time string value to be parsed.
Asn1Exception - Thrown, if operation is failed.protected boolean compileString()
compileString in class Asn1Time
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 done
java.io.IOException - Any exception thrown by the underlying OutputStream.
Asn1Exception - Thrown, if operation is failed.
public void encode(Asn1XerEncoder buffer,
java.lang.String elemName,
java.lang.String attribute)
throws java.io.IOException,
Asn1Exception
encode in interface Asn1TypeIFencode in class Asn1CharStringbuffer - Encode message buffer objectelemName - XML element name used to wrap stringattribute - XML element attribute value
java.io.IOException
Asn1Exception
public void encodeXMLData(Asn1XerEncoder buffer)
throws java.io.IOException,
Asn1Exception
buffer - String buffer to hold the converted xml time string
Asn1Exception - any exception exist in Asn.1 Generalized Time string
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||