Package org.apache.harmony.security.asn1
Class DerInputStream
- java.lang.Object
-
- org.apache.harmony.security.asn1.BerInputStream
-
- org.apache.harmony.security.asn1.DerInputStream
-
public final class DerInputStream extends BerInputStream
Decodes ASN.1 types encoded with DER (X.690)- See Also:
- ASN.1
-
-
Field Summary
-
Fields inherited from class org.apache.harmony.security.asn1.BerInputStream
buffer, choiceIndex, content, contentOffset, INDEFINIT_LENGTH, isIndefinedLength, isVerify, length, offset, oidElement, tag, tagOffset, times
-
-
Constructor Summary
Constructors Constructor Description DerInputStream(byte[] encoded)DerInputStream(byte[] encoded, int offset, int encodingLen)DerInputStream(InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intnext()Decodes next encoded type.voidreadBitString()Decodes ASN.1 bitstring typevoidreadBoolean()Decodes ASN.1 boolean typevoidreadGeneralizedTime()Decodes ASN.1 GeneralizedTime typevoidreadOctetString()Decodes ASN.1 Octetstring typevoidreadSequence(ASN1Sequence sequence)Decodes ASN.1 Sequence typevoidreadSetOf(ASN1SetOf setOf)Decodes ASN.1 SetOf typevoidreadString(ASN1StringType type)Decodes ASN.1 String typevoidreadUTCTime()Decodes ASN.1 UTCTime type-
Methods inherited from class org.apache.harmony.security.asn1.BerInputStream
compactBuffer, get, getBuffer, getEncoded, getEndOffset, getLength, getLength, getOffset, getTagOffset, put, read, readContent, readEnumerated, readInteger, readOID, readSequenceOf, readSet, reset, setVerify
-
-
-
-
Constructor Detail
-
DerInputStream
public DerInputStream(byte[] encoded) throws IOException- Throws:
IOException
-
DerInputStream
public DerInputStream(byte[] encoded, int offset, int encodingLen) throws IOException- Throws:
IOException
-
DerInputStream
public DerInputStream(InputStream in) throws IOException
- Throws:
IOException
-
-
Method Detail
-
next
public int next() throws IOExceptionDescription copied from class:BerInputStreamDecodes next encoded type. Initializes tag, length, tagOffset and contentOffset variables- Overrides:
nextin classBerInputStream- Returns:
- next decoded tag
- Throws:
IOException- if error occured
-
readBitString
public void readBitString() throws IOExceptionDescription copied from class:BerInputStreamDecodes ASN.1 bitstring type- Overrides:
readBitStringin classBerInputStream- Throws:
IOException
-
readBoolean
public void readBoolean() throws IOExceptionDescription copied from class:BerInputStreamDecodes ASN.1 boolean type- Overrides:
readBooleanin classBerInputStream- Throws:
IOException
-
readOctetString
public void readOctetString() throws IOExceptionDescription copied from class:BerInputStreamDecodes ASN.1 Octetstring type- Overrides:
readOctetStringin classBerInputStream- Throws:
IOException
-
readSequence
public void readSequence(ASN1Sequence sequence) throws IOException
Description copied from class:BerInputStreamDecodes ASN.1 Sequence type- Overrides:
readSequencein classBerInputStream- Throws:
IOException
-
readSetOf
public void readSetOf(ASN1SetOf setOf) throws IOException
Description copied from class:BerInputStreamDecodes ASN.1 SetOf type- Overrides:
readSetOfin classBerInputStream- Throws:
IOException
-
readString
public void readString(ASN1StringType type) throws IOException
Description copied from class:BerInputStreamDecodes ASN.1 String type- Overrides:
readStringin classBerInputStream- Throws:
IOException- if an I/O error occurs or the end of the stream is reached
-
readUTCTime
public void readUTCTime() throws IOExceptionDescription copied from class:BerInputStreamDecodes ASN.1 UTCTime type- Overrides:
readUTCTimein classBerInputStream- Throws:
IOException- if an I/O error occurs or the end of the stream is reached
-
readGeneralizedTime
public void readGeneralizedTime() throws IOExceptionDescription copied from class:BerInputStreamDecodes ASN.1 GeneralizedTime type- Overrides:
readGeneralizedTimein classBerInputStream- Throws:
IOException- if error occured
-
-