org.apache.directory.shared.asn1.der
Class ASN1InputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byorg.apache.directory.shared.asn1.der.ASN1InputStream

public class ASN1InputStream
extends java.io.FilterInputStream

General purpose ASN.1 decoder.


Field Summary
private  DERObject END_OF_STREAM
           
private  boolean EOF_FOUND
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Fields inherited from class java.io.InputStream
 
Constructor Summary
ASN1InputStream(byte[] input)
           
ASN1InputStream(java.nio.ByteBuffer in)
           
 
Method Summary
private  BERConstructedOctetString buildConstructedOctetString()
           
protected  DEREncodable buildObject(int tag, byte[] bytes)
          Build an object given its tag and a byte stream.
private static java.io.InputStream newInputStream(java.nio.ByteBuffer buf)
           
protected  void readFully(byte[] bytes)
           
private  byte[] readIndefiniteLengthFully()
          Read a string of bytes representing an indefinite length object.
protected  int readLength()
           
 DEREncodable readObject()
           
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EOF_FOUND

private boolean EOF_FOUND

END_OF_STREAM

private DERObject END_OF_STREAM
Constructor Detail

ASN1InputStream

public ASN1InputStream(java.nio.ByteBuffer in)

ASN1InputStream

public ASN1InputStream(byte[] input)
Method Detail

newInputStream

private static java.io.InputStream newInputStream(java.nio.ByteBuffer buf)

readLength

protected int readLength()
                  throws java.io.IOException
Throws:
java.io.IOException

readFully

protected void readFully(byte[] bytes)
                  throws java.io.IOException
Throws:
java.io.IOException

buildObject

protected DEREncodable buildObject(int tag,
                                   byte[] bytes)
                            throws java.io.IOException
Build an object given its tag and a byte stream.

Throws:
java.io.IOException

readIndefiniteLengthFully

private byte[] readIndefiniteLengthFully()
                                  throws java.io.IOException
Read a string of bytes representing an indefinite length object.

Throws:
java.io.IOException

buildConstructedOctetString

private BERConstructedOctetString buildConstructedOctetString()
                                                       throws java.io.IOException
Throws:
java.io.IOException

readObject

public DEREncodable readObject()
                        throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2003-2006 . All Rights Reserved.