|
Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10696-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.asn1.ASN1Header
public class ASN1Header
Represents the header (tag, encoding method, and length) of an ASN.1 object encoding.
Field Summary |
---|
Fields inherited from interface oracle.security.crypto.asn1.ASN1 |
---|
APPLICATION, BIT_STRING, BMP_STRING, BOOLEAN, CONSTRUCTED, CONSTRUCTED_DEFINITE, CONSTRUCTED_INDEFINITE, CONTEXT_SPECIFIC, END_OF_CONTENTS, ENUMERATED, EXTERNAL, GENERAL_STRING, GENERALIZED_TIME, GRAPHIC_STRING, IA5STRING, INTEGER, ISO646_STRING, NULL, NUMERIC_STRING, OBJECT_DESCRIPTOR, OBJECT_IDENTIFIER, OCTET_STRING, PRIMITIVE, PRINTABLE_STRING, PRIVATE, REAL, SEQUENCE, SET, T61STRING, TAG, TAG_CLASS, TELETEX_STRING, UNIVERSAL, UNIVERSAL_STRING, UTCTIME, UTF8_STRING, VIDEOTEX_STRING, VISIBLE_STRING |
Constructor Summary | |
---|---|
ASN1Header() Creates an uninitialized ASN.1 header. |
|
ASN1Header(java.io.InputStream is) |
|
ASN1Header(int t, int c) Creates an ASN1 Header of the specified tag and tag class. |
|
ASN1Header(int t, int c, int m, int l) Creates an ASN1 Header of the specified tag, tag class, encoding method, and length. |
Method Summary | |
---|---|
void |
checkEncodingMethod(int encodingMethod) |
void |
checkTag(int tag) |
void |
checkTagClass(int tagClass) |
java.lang.String |
encodingMethodToString(int encodingMethod) |
int |
getBodyLength() Returns the length of the body of this ASN.1 object. |
int |
getEncodingMethod() |
int |
getTag() |
int |
getTagClass() |
byte[] |
headerAndBody(java.io.InputStream is) |
void |
input(java.io.InputStream is) Reads this header from the specified input stream. |
int |
length() Returns the length of the DER encoding of this ASN.1 header. |
void |
output(java.io.OutputStream os) Writes this header to the specified output stream. |
byte[] |
readBody(java.io.InputStream is) Reads in the body from the specified input stream and returns it as a byte array. |
void |
skipBody(java.io.InputStream is) |
java.lang.String |
tagClassToString(int tagClass) |
java.lang.String |
tagToString(int tag) |
java.lang.String |
toString() |
int |
totalLength() Returns the total length of the ASN.1 object corresponding to this header. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ASN1Header()
public ASN1Header(int t, int c)
t
- The universal-class tag for this type (e.g., ASN1.IA5STRING)c
- The tag class (e.g., ASN1.UNIVERSAL).public ASN1Header(int t, int c, int m, int l)
t
- The universal-class tag for this type (e.g., ASN1.IA5STRING)c
- The tag class (e.g., ASN1.UNIVERSAL).m
- The encoding method.l
- The body length.public ASN1Header(java.io.InputStream is) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public int getTag()
public int getTagClass()
public int getEncodingMethod()
public int getBodyLength()
-1
is returned.public int length()
length
in interface Streamable
public int totalLength()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String tagClassToString(int tagClass)
public java.lang.String tagToString(int tag)
public java.lang.String encodingMethodToString(int encodingMethod)
public void checkTagClass(int tagClass) throws ASN1FormatException
ASN1FormatException
public void checkTag(int tag) throws ASN1FormatException
ASN1FormatException
public void checkEncodingMethod(int encodingMethod) throws ASN1FormatException
ASN1FormatException
public void output(java.io.OutputStream os) throws java.io.IOException
output
in interface Streamable
java.io.IOException
public void input(java.io.InputStream is) throws java.io.IOException
input
in interface Streamable
java.io.IOException
public void skipBody(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public byte[] readBody(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public byte[] headerAndBody(java.io.InputStream is) throws java.io.IOException
java.io.IOException
|
Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10696-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |