LDAP Classes
Implements Java LDAP

com.novell.ldap.asn1
Class ASN1Tagged

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

public class ASN1Tagged
extends ASN1Object

The ASN1Tagged class can hold a base ASN1Object with a distinctive tag describing the type of that base object. It also maintains a boolean value indicating whether the value should be encoded by EXPLICIT or IMPLICIT means. (Explicit is true by default.) If the type is encoded IMPLICITLY, the base types form, length and content will be encoded as usual along with the class type and tag specified in the constructor of this ASN1Tagged class. If the type is to be encoded EXPLICITLY, the base type will be encoded as usual after the ASN1Tagged identifier has been encoded.

See Also:
Serialized Form

Constructor Summary
ASN1Tagged(ASN1Decoder dec, java.io.InputStream in, int len, ASN1Identifier identifier)
          Constructs an ASN1Tagged object by decoding data from an input stream.
ASN1Tagged(ASN1Identifier identifier, ASN1Object object)
          Constructs an ASN1Tagged object using the provided AN1Identifier and the ASN1Object.
ASN1Tagged(ASN1Identifier identifier, ASN1Object object, boolean explicit)
          Constructs an ASN1Tagged object.
 
Method Summary
 void encode(ASN1Encoder enc, java.io.OutputStream out)
          Call this method to encode the current instance into the specified output stream using the specified encoder object.
 boolean isExplicit()
          Returns a boolean value indicating if this object uses EXPLICIT tagging.
 void setTaggedValue(ASN1Object content)
          Sets the ASN1Object tagged value
 ASN1Object taggedValue()
          Returns the ASN1Object stored in this ASN1Tagged object
 java.lang.String toString()
          Return a String representation of this ASN1Object.
 
Methods inherited from class com.novell.ldap.asn1.ASN1Object
getEncoding, getIdentifier, setIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASN1Tagged

public ASN1Tagged(ASN1Identifier identifier,
                  ASN1Object object)
Constructs an ASN1Tagged object using the provided AN1Identifier and the ASN1Object. The explicit flag defaults to true as per the spec.


ASN1Tagged

public ASN1Tagged(ASN1Identifier identifier,
                  ASN1Object object,
                  boolean explicit)
Constructs an ASN1Tagged object.


ASN1Tagged

public ASN1Tagged(ASN1Decoder dec,
                  java.io.InputStream in,
                  int len,
                  ASN1Identifier identifier)
           throws java.io.IOException
Constructs an ASN1Tagged object by decoding data from an input stream.

Parameters:
dec - The decoder object to use when decoding the input stream. Sometimes a developer might want to pass in his/her own decoder object
in - A byte stream that contains the encoded ASN.1
Method Detail

encode

public final void encode(ASN1Encoder enc,
                         java.io.OutputStream out)
                  throws java.io.IOException
Call this method to encode the current 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

taggedValue

public final ASN1Object taggedValue()
Returns the ASN1Object stored in this ASN1Tagged object


setTaggedValue

public final void setTaggedValue(ASN1Object content)
Sets the ASN1Object tagged value


isExplicit

public final boolean isExplicit()
Returns a boolean value indicating if this object uses EXPLICIT tagging.


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