Package org.apache.harmony.security.asn1
Class ASN1Explicit
java.lang.Object
org.apache.harmony.security.asn1.ASN1Type
org.apache.harmony.security.asn1.ASN1Constructed
org.apache.harmony.security.asn1.ASN1Explicit
- All Implemented Interfaces:
ASN1Constants
public final class ASN1Explicit extends ASN1Constructed
This class represents explicitly tagged ASN.1 type.
- See Also:
- ASN.1
-
Field Summary
Fields inherited from interface org.apache.harmony.security.asn1.ASN1Constants
CLASS_APPLICATION, CLASS_CONTEXTSPECIFIC, CLASS_PRIVATE, CLASS_UNIVERSAL, PC_CONSTRUCTED, PC_PRIMITIVE, TAG_ANY, TAG_BITSTRING, TAG_BMPSTRING, TAG_BOOLEAN, TAG_C_BITSTRING, TAG_C_GENERALIZEDTIME, TAG_C_OCTETSTRING, TAG_C_SEQUENCE, TAG_C_SEQUENCEOF, TAG_C_SET, TAG_C_SETOF, TAG_C_UTCTIME, TAG_C_UTF8STRING, TAG_CHOICE, TAG_EMBEDDEDPDV, TAG_ENUM, TAG_EXTERNAL, TAG_GENERALIZEDTIME, TAG_GENERALSTRING, TAG_GRAPHICSTRING, TAG_IA5STRING, TAG_INSTANCEOF, TAG_INTEGER, TAG_ISO646STRING, TAG_NULL, TAG_NUMERICSTRING, TAG_OBJDESCRIPTOR, TAG_OCTETSTRING, TAG_OID, TAG_PRINTABLESTRING, TAG_REAL, TAG_RELATIVEOID, TAG_SEQUENCE, TAG_SEQUENCEOF, TAG_SET, TAG_SETOF, TAG_T61STRING, TAG_TELETEXSTRING, TAG_UNIVERSALSTRING, TAG_UTCTIME, TAG_UTF8STRING, TAG_VIDEOTEXSTRING, TAG_VISIBLESTRING -
Constructor Summary
Constructors Constructor Description ASN1Explicit(int tagClass, int tagNumber, ASN1Type type)Constructs explicitly tagged ASN.1 type.ASN1Explicit(int tagNumber, ASN1Type type)Constructs explicitly tagged ASN.1 type with context-specific tag class and specified tag number. -
Method Summary
Modifier and Type Method Description Objectdecode(BerInputStream in)Decodes ASN.1 type.voidencodeContent(BerOutputStream out)voidsetEncodingContent(BerOutputStream out)StringtoString()Returns a string containing a concise, human-readable description of this object.Methods inherited from class org.apache.harmony.security.asn1.ASN1Constructed
checkTag, encodeASNMethods inherited from class org.apache.harmony.security.asn1.ASN1Type
decode, decode, decode, encode, getDecodedObject, getEncodedLength, verify, verify
-
Field Details
-
type
Tagged type
-
-
Constructor Details
-
ASN1Explicit
Constructs explicitly tagged ASN.1 type with context-specific tag class and specified tag number.- Parameters:
tagNumber- - ASN.1 tag numbertype- - ASN.1 type to be tagged- Throws:
IllegalArgumentException- - if tagNumber is invalid
-
ASN1Explicit
Constructs explicitly tagged ASN.1 type.- Parameters:
tagClass- - ASN.1 tag class.tagNumber- - ASN.1 tag numbertype- - ASN.1 type to be tagged- Throws:
IllegalArgumentException- - if tagClass or tagNumber is invalid
-
-
Method Details
-
decode
Description copied from class:ASN1TypeDecodes ASN.1 type.- Specified by:
decodein classASN1Type- Throws:
IOException- if an I/O error occurs or the end of the stream is reached
-
encodeContent
- Specified by:
encodeContentin classASN1Type
-
setEncodingContent
- Specified by:
setEncodingContentin classASN1Type
-
toString
Description copied from class:ObjectReturns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toStringmethod if you intend implementing your owntoStringmethod.
-