com.mindbright.asn1
Class ASN1Structure

java.lang.Object
  extended by com.mindbright.asn1.ASN1Object
      extended by com.mindbright.asn1.ASN1Structure
Direct Known Subclasses:
ASN1Any.ASN1AnyStructure, ASN1ConstructedString, ASN1Explicit, ASN1Sequence, ASN1Set

public class ASN1Structure
extends ASN1Object


Field Summary
protected  com.mindbright.asn1.ASN1Structure.StructComponent[] components
           
protected  int count
           
protected  java.lang.Class ofType
           
 
Fields inherited from class com.mindbright.asn1.ASN1Object
isSet, tag
 
Constructor Summary
protected ASN1Structure(int tag)
           
protected ASN1Structure(int tag, int initialSize)
           
 
Method Summary
 void addComponent(ASN1Object component)
           
 void addComponent(ASN1Object component, ASN1Object defaultValue, boolean isOptional)
           
 void addOptional(ASN1Object component)
           
 void addOptional(ASN1Object component, boolean defBoolean)
           
 void addOptional(ASN1Object component, int defInteger)
           
 void decodeValue(ASN1Decoder decoder, java.io.InputStream in, int len)
           
 int encodeValue(ASN1Encoder encoder, java.io.OutputStream out)
           
 boolean equals(java.lang.Object obj)
           
 ASN1Object getComponent(int index)
           
 int getCount()
           
 ASN1Object getDecodeComponent(int index, int tag)
           
 ASN1Object getDefault(int index)
           
 ASN1Object getDistinctComponent(int tag)
           
 int hashCode()
           
 boolean isOptional(int index)
           
protected  java.lang.Class ofType()
           
 
Methods inherited from class com.mindbright.asn1.ASN1Object
decodeValue, getTag, getType, isSet, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

components

protected com.mindbright.asn1.ASN1Structure.StructComponent[] components

count

protected int count

ofType

protected java.lang.Class ofType
Constructor Detail

ASN1Structure

protected ASN1Structure(int tag)

ASN1Structure

protected ASN1Structure(int tag,
                        int initialSize)
Method Detail

getCount

public int getCount()

getComponent

public ASN1Object getComponent(int index)

getDistinctComponent

public ASN1Object getDistinctComponent(int tag)

isOptional

public boolean isOptional(int index)

getDefault

public ASN1Object getDefault(int index)

getDecodeComponent

public ASN1Object getDecodeComponent(int index,
                                     int tag)
                              throws java.io.IOException
Throws:
java.io.IOException

addComponent

public void addComponent(ASN1Object component)

addComponent

public void addComponent(ASN1Object component,
                         ASN1Object defaultValue,
                         boolean isOptional)

addOptional

public void addOptional(ASN1Object component)

addOptional

public void addOptional(ASN1Object component,
                        int defInteger)

addOptional

public void addOptional(ASN1Object component,
                        boolean defBoolean)

encodeValue

public int encodeValue(ASN1Encoder encoder,
                       java.io.OutputStream out)
                throws java.io.IOException
Specified by:
encodeValue in class ASN1Object
Throws:
java.io.IOException

decodeValue

public void decodeValue(ASN1Decoder decoder,
                        java.io.InputStream in,
                        int len)
                 throws java.io.IOException
Overrides:
decodeValue in class ASN1Object
Throws:
java.io.IOException

ofType

protected java.lang.Class ofType()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object