LDAP Classes
Implements Java LDAP

com.novell.ldap.asn1
Class ASN1Structured

java.lang.Object
  extended bycom.novell.ldap.asn1.ASN1Object
      extended bycom.novell.ldap.asn1.ASN1Structured
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ASN1Sequence, ASN1SequenceOf, ASN1Set, ASN1SetOf

public abstract class ASN1Structured
extends ASN1Object

This class serves as the base type for all ASN.1 structured types.

See Also:
Serialized Form

Constructor Summary
protected ASN1Structured(ASN1Identifier id)
           
protected ASN1Structured(ASN1Identifier id, ASN1Object[] newContent, int size)
           
protected ASN1Structured(ASN1Identifier id, int size)
           
 
Method Summary
 void add(ASN1Object value)
          Adds a new ASN1Object to the end of this ASN1Structured object.
protected  void decodeStructured(ASN1Decoder dec, java.io.InputStream in, int len)
          Decode an ASN1Structured type from an InputStream.
 void encode(ASN1Encoder enc, java.io.OutputStream out)
          Encodes the contents of this ASN1Structured directly to an output stream.
 ASN1Object get(int index)
          Gets a specific ASN1Object in this structred object.
 void set(int index, ASN1Object value)
          Replaces the ASN1Object in the specified index position of this ASN1Structured object.
 int size()
          Returns the number of ASN1Obejcts that have been encoded into this ASN1Structured class.
 ASN1Object[] toArray()
          Returns an array containing the individual ASN.1 elements of this ASN1Structed object.
 java.lang.String toString(java.lang.String type)
          Creates a String representation of this ASN1Structured.
 
Methods inherited from class com.novell.ldap.asn1.ASN1Object
getEncoding, getIdentifier, setIdentifier, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASN1Structured

protected ASN1Structured(ASN1Identifier id)

ASN1Structured

protected ASN1Structured(ASN1Identifier id,
                         int size)

ASN1Structured

protected ASN1Structured(ASN1Identifier id,
                         ASN1Object[] newContent,
                         int size)
Method Detail

encode

public final void encode(ASN1Encoder enc,
                         java.io.OutputStream out)
                  throws java.io.IOException
Encodes the contents of this ASN1Structured directly to an output stream.

Specified by:
encode in class ASN1Object
Parameters:
out - The output stream onto which the encoded ASN1Object will be placed.
Throws:
java.io.IOException

decodeStructured

protected final void decodeStructured(ASN1Decoder dec,
                                      java.io.InputStream in,
                                      int len)
                               throws java.io.IOException
Decode an ASN1Structured type from an InputStream.

Throws:
java.io.IOException

toArray

public final ASN1Object[] toArray()
Returns an array containing the individual ASN.1 elements of this ASN1Structed object.

Returns:
an array of ASN1Objects

add

public final void add(ASN1Object value)
Adds a new ASN1Object to the end of this ASN1Structured object.

Parameters:
value - The ASN1Object to add to this ASN1Structured object.

set

public final void set(int index,
                      ASN1Object value)
Replaces the ASN1Object in the specified index position of this ASN1Structured object.

Parameters:
index - The index into the ASN1Structured object where this new ANS1Object will be placed.
value - The ASN1Object to set in this ASN1Structured object.

get

public final ASN1Object get(int index)
Gets a specific ASN1Object in this structred object.

Parameters:
index - The index of the ASN1Object to get from this ASN1Structured object.

size

public final int size()
Returns the number of ASN1Obejcts that have been encoded into this ASN1Structured class.


toString

public java.lang.String toString(java.lang.String type)
Creates a String representation of this ASN1Structured. object.

Parameters:
type - the Type to put in the String representing this structured object
Returns:
the String representation of this object.

LDAP Classes
Implements Java LDAP

Copyright © 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000