LDAP Classes
Implements Java LDAP

com.novell.ldap.asn1
Class ASN1Object

java.lang.Object
  extended bycom.novell.ldap.asn1.ASN1Object
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ASN1Boolean, ASN1Choice, ASN1Null, ASN1Numeric, ASN1OctetString, ASN1Structured, ASN1Tagged

public abstract class ASN1Object
extends java.lang.Object
implements java.io.Serializable

This is the base class for all other ASN1 types.

See Also:
Serialized Form

Constructor Summary
ASN1Object(ASN1Identifier id)
           
 
Method Summary
abstract  void encode(ASN1Encoder enc, java.io.OutputStream out)
          Abstract method that must be implemented by each child class to encode itself ( an ASN1Object) directly intto a output stream.
 byte[] getEncoding(ASN1Encoder enc)
          This method returns a byte array representing the encoded ASN1Object.
 ASN1Identifier getIdentifier()
          Returns the identifier for this ASN1Object as an ASN1Identifier.
protected  void setIdentifier(ASN1Identifier id)
          Sets the identifier for this ASN1Object.
 java.lang.String toString()
          Return a String representation of this ASN1Object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASN1Object

public ASN1Object(ASN1Identifier id)
Method Detail

encode

public abstract void encode(ASN1Encoder enc,
                            java.io.OutputStream out)
                     throws java.io.IOException
Abstract method that must be implemented by each child class to encode itself ( an ASN1Object) directly intto a output stream.

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

getIdentifier

public ASN1Identifier getIdentifier()
Returns the identifier for this ASN1Object as an ASN1Identifier. This ASN1Identifier object will include the CLASS, FORM and TAG for this ASN1Object.


setIdentifier

protected void setIdentifier(ASN1Identifier id)
Sets the identifier for this ASN1Object. This is helpful when creating implicit ASN1Tagged types.

Parameters:
id - An ASN1Identifier object representing the CLASS, FORM and TAG)

getEncoding

public final byte[] getEncoding(ASN1Encoder enc)
This method returns a byte array representing the encoded ASN1Object. It in turn calls the encode method that is defined in ASN1Object but will usually be implemented in the child ASN1 classses.


toString

public java.lang.String toString()
Return a String representation of this ASN1Object.


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