LDAP Classes
Implements Java LDAP

com.novell.ldap.asn1
Class ASN1Integer

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

public class ASN1Integer
extends ASN1Numeric

This class encapsulates the ASN.1 INTEGER type.

See Also:
Serialized Form

Field Summary
static ASN1Identifier ID
          ID is added for Optimization.
static int TAG
          ASN.1 INTEGER tag definition.
 
Constructor Summary
ASN1Integer(ASN1Decoder dec, java.io.InputStream in, int len)
          Constructs an ASN1Integer object by decoding data from an input stream.
ASN1Integer(int content)
          Call this constructor to construct an ASN1Integer object from an integer value.
ASN1Integer(long content)
          Call this constructor to construct an ASN1Integer object from a long value.
 
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.
 java.lang.String toString()
          Returns a String representation of this ASN1Integer object.
 
Methods inherited from class com.novell.ldap.asn1.ASN1Numeric
intValue, longValue
 
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
 

Field Detail

TAG

public static final int TAG
ASN.1 INTEGER tag definition.

See Also:
Constant Field Values

ID

public static final ASN1Identifier ID
ID is added for Optimization.

ID needs only be one Value for every instance, thus we create it only once.

Constructor Detail

ASN1Integer

public ASN1Integer(int content)
Call this constructor to construct an ASN1Integer object from an integer value.

Parameters:
content - The integer value to be contained in the this ASN1Integer object

ASN1Integer

public ASN1Integer(long content)
Call this constructor to construct an ASN1Integer object from a long value.

Parameters:
content - The long value to be contained in the this ASN1Integer object

ASN1Integer

public ASN1Integer(ASN1Decoder dec,
                   java.io.InputStream in,
                   int len)
            throws java.io.IOException
Constructs an ASN1Integer 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

toString

public java.lang.String toString()
Returns a String representation of this ASN1Integer object.

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