LDAP Classes
Implements Java LDAP

com.novell.ldap.asn1
Class ASN1Choice

java.lang.Object
  extended bycom.novell.ldap.asn1.ASN1Object
      extended bycom.novell.ldap.asn1.ASN1Choice
All Implemented Interfaces:
java.io.Serializable

public class ASN1Choice
extends ASN1Object

The ASN1Choice object represents the choice of any ASN1Object. All ASN1Object methods are delegated to the object this ASN1Choice contains.

See Also:
Serialized Form

Constructor Summary
protected ASN1Choice()
          No arg Constructor.
  ASN1Choice(ASN1Object content)
          Constructs an ASN1Choice object using an ASN1Object value.
 
Method Summary
 ASN1Object choiceValue()
          Returns the CHOICE value stored in this ASN1Choice as an ASN1Object.
 void encode(ASN1Encoder enc, java.io.OutputStream out)
          Call this method to encode the contents of this ASN1Choice instance into the specified output stream using the specified encoder object.
 ASN1Identifier getIdentifier()
          This method will return the ASN1Identifier of the encoded ASN1Object.We override the parent method as the identifier of an ASN1Choice depends on the type of the object encoded by this ASN1Choice.
protected  void setChoiceValue(ASN1Object content)
          Sets the CHOICE value stored in this ASN1Choice.
 void setIdentifier(ASN1Identifier id)
          Sets the identifier of the contained ASN1Object.
 java.lang.String toString()
          Return a String representation of this ASN1Object.
 
Methods inherited from class com.novell.ldap.asn1.ASN1Object
getEncoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASN1Choice

public ASN1Choice(ASN1Object content)
Constructs an ASN1Choice object using an ASN1Object value.

Parameters:
content - The ASN1Object that this ASN1Choice will encode. Since all ASN1 objects are derived from ASN1Object any basic type can be passed in.

ASN1Choice

protected ASN1Choice()
No arg Constructor. This is used by Filter, who subsequently sets the content after parsing the RFC 2254 Search Filter String.

Method Detail

encode

public final void encode(ASN1Encoder enc,
                         java.io.OutputStream out)
                  throws java.io.IOException
Call this method to encode the contents of this ASN1Choice instance into the specified output stream using the specified encoder object.

Specified by:
encode in class ASN1Object
Parameters:
enc - Encoder object to use when encoding self.
out - The output stream onto which the encoded byte stream is written.
Throws:
java.io.IOException

choiceValue

public final ASN1Object choiceValue()
Returns the CHOICE value stored in this ASN1Choice as an ASN1Object.


setChoiceValue

protected void setChoiceValue(ASN1Object content)
Sets the CHOICE value stored in this ASN1Choice.

Parameters:
content - The ASN1Object that this ASN1Choice will encode. Since all ASN1 objects are derived from ASN1Object any basic type can be passed in.

getIdentifier

public final ASN1Identifier getIdentifier()
This method will return the ASN1Identifier of the encoded ASN1Object.We override the parent method as the identifier of an ASN1Choice depends on the type of the object encoded by this ASN1Choice.

Overrides:
getIdentifier in class ASN1Object

setIdentifier

public final void setIdentifier(ASN1Identifier id)
Sets the identifier of the contained ASN1Object. We override the parent method as the identifier of an ASN1Choice depends on the type of the object encoded by this ASN1Choice.

Overrides:
setIdentifier in class ASN1Object
Parameters:
id - An ASN1Identifier object representing the CLASS, FORM and TAG)

toString

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

Overrides:
toString in class 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