|
All LDAP Classes Internal LDAP Classes |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.ldap.asn1.ASN1Identifier
public class ASN1Identifier
This class is used to encapsulate an ASN.1 Identifier.
An ASN1Identifier is composed of three parts:
The class type is defined as:
bit 8 7 TAG CLASS ------- ----------- 0 0 UNIVERSAL 0 1 APPLICATION 1 0 CONTEXT 1 1 PRIVATE
The form is defined as:
bit 6 FORM ----- -------- 0 PRIMITIVE 1 CONSTRUCTED
Note: CONSTRUCTED types are made up of other CONSTRUCTED or PRIMITIVE types.
The tag is defined as:
bit 5 4 3 2 1 TAG ------------- --------------------------------------------- 0 0 0 0 0 . . . . . 1 1 1 1 0 (0-30) single octet tag 1 1 1 1 1 (> 30) multiple octet tag, more octets follow
Field Summary | |
---|---|
static int |
APPLICATION
Application-wide tag class. |
private boolean |
constructed
|
static int |
CONTEXT
Context-specific tag class. |
private int |
encodedLength
|
static int |
PRIVATE
Private-use tag class. |
private int |
tag
|
private int |
tagClass
|
static int |
UNIVERSAL
Universal tag class. |
Constructor Summary | |
---|---|
ASN1Identifier()
|
|
ASN1Identifier(java.io.InputStream in)
Decode an ASN1Identifier directly from an InputStream and save the encoded length of the ASN1Identifier. |
|
ASN1Identifier(int tagClass,
boolean constructed,
int tag)
Constructs an ASN1Identifier using the classtype, form and tag. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates a duplicate, not a true clone, of this object and returns a reference to the duplicate. |
private int |
decodeTagNumber(java.io.InputStream in)
In the case that we have a tag number that is greater than 30, we need to decode a multiple octet tag number. |
int |
getASN1Class()
Returns the CLASS of this ASN1Identifier as an int value. |
boolean |
getConstructed()
Return a boolean indicating if the constructed bit is set. |
int |
getEncodedLength()
Returns the encoded length of this ASN1Identifier. |
int |
getTag()
Returns the TAG of this ASN1Identifier. |
boolean |
isApplication()
Returns a boolean value indicating whether or not this ASN1Identifier has a TAG CLASS of APPLICATION. |
boolean |
isContext()
Returns a boolean value indicating whether or not this ASN1Identifier has a TAG CLASS of CONTEXT-SPECIFIC. |
boolean |
isPrivate()
Returns a boolean value indicating whether or not this ASN1Identifier has a TAG CLASS of PRIVATE. |
boolean |
isUniversal()
Returns a boolean value indicating whether or not this ASN1Identifier has a TAG CLASS of UNIVERSAL. |
private void |
readObject(java.io.ObjectInputStream objectIStrm)
Reads the serialized object from the underlying input stream. |
void |
reset(java.io.InputStream in)
Decode an ASN1Identifier directly from an InputStream and save the encoded length of the ASN1Identifier, but reuse the object. |
private void |
writeObject(java.io.ObjectOutputStream objectOStrm)
Writes the object state to a stream in standard Default Binary format This function wraps ObjectOutputStream' s defaultWriteObject() to write the non-static and non-transient fields of the current class to the stream |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNIVERSAL
UNIVERSAL = 0
public static final int APPLICATION
APPLICATION = 1
public static final int CONTEXT
CONTEXT = 2
public static final int PRIVATE
PRIVATE = 3
private int tagClass
private boolean constructed
private int tag
private int encodedLength
Constructor Detail |
---|
public ASN1Identifier(int tagClass, boolean constructed, int tag)
tagClass
- As defined above.constructed
- Set to true if constructed and false if primitive.tag
- The tag of this identifierpublic ASN1Identifier(java.io.InputStream in) throws java.io.IOException
in
- The input stream to decode from.
java.io.IOException
public ASN1Identifier()
Method Detail |
---|
public final void reset(java.io.InputStream in) throws java.io.IOException
in
- The input stream to decode from.
java.io.IOException
private int decodeTagNumber(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public final int getASN1Class()
UNIVERSAL
,
APPLICATION
,
CONTEXT
,
PRIVATE
public final boolean getConstructed()
public final int getTag()
public final int getEncodedLength()
public final boolean isUniversal()
UNIVERSAL
public final boolean isApplication()
APPLICATION
public final boolean isContext()
CONTEXT
public final boolean isPrivate()
PRIVATE
public java.lang.Object clone()
clone
in class java.lang.Object
private void writeObject(java.io.ObjectOutputStream objectOStrm) throws java.io.IOException
objectOStrm
- The OutputSteam where the Object need to be written
java.io.IOException
private void readObject(java.io.ObjectInputStream objectIStrm) throws java.io.IOException, java.lang.ClassNotFoundException
objectIStrm
- InputStream used to recover those objects previously serialized.
java.io.IOException
java.lang.ClassNotFoundException
|
All LDAP Classes Internal LDAP Classes |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |