|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.ldap.asn1.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. |
static int |
CONTEXT
Context-specific tag class. |
static int |
PRIVATE
Private-use tag class. |
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. |
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. |
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. |
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
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.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
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()
|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |