public class ASNOne
extends java.lang.Object
The following rules are applied to the LDAP string:
BER encoding. Primitive contents octets are as follows, where value1, ..., valueN denote the integer values of the components in the complete object identifier:
(From "A Layman's Guide to a Subst of ASN.1, BER, and DER" by Burton S. Kaliski Jr., Revised November 1, 1993.)
Example: The ASN.1 encoding for the LDAP OID string "1.2.840.113549" is 06 06 2A 86 48 86 F7 0D. 06 06 represents the length of the data following this byte. The first 06 in the 06 06 sequence is a special byte signifying that this data represents an OID.
The schema OIDs for the DNIP schema extensions are:
The LDAP OID for the "DNIP:Subnet Attr" attribute is represented as:
2.16.840.1.113719.1.25.4.1.1
The 1.1 at the end is the sequence number, which should be incremented for each new attribute type. The first 1 in the ending 1.1 sequence is the revision number of the attribute type (generally this is always 1).
The following table lists the currently-assigned OID to the various DNS/DHCP attribute types and object classes:
| Attribute Type/Object Class | OID |
| DNS/DHCP Attribute Types/DNIP:Subnet Attr | 2.16.840.1.113719.1.25.4.1.1 |
| Constructor and Description |
|---|
ASNOne(byte[] oidArray)
Constructor using a ASN1 ID byte array.
|
ASNOne(java.lang.String ldapString)
Constructor using a ldap string representing an LDAP OID.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Byte |
firstOctetEncoder(java.lang.String firstComp,
java.lang.String secondComp)
Encodes two components of the LDAP OID String into a Byte object.
|
byte[] |
getAsn1()
Returns the ASN1 ID sequence of bytes.
|
byte[] |
getNullAsn1()
Returns an empty byte array sized to 32 bytes.
|
java.lang.String |
getOid()
Returns the LDAP OID String value.
|
byte[] |
parseLDAPComponent(java.lang.String ldapComponent)
Converts the given ldapComponent into a sequence of encoded bytes.
|
java.lang.String |
toString()
Return the LDAP OID string.
|
public ASNOne(java.lang.String ldapString)
ldapString - String containing and LDAP OID.public ASNOne(byte[] oidArray)
oidArray - byte array containing an ASN1 ID sequence of bytespublic java.lang.String getOid()
public byte[] getAsn1()
public byte[] getNullAsn1()
protected java.lang.Byte firstOctetEncoder(java.lang.String firstComp,
java.lang.String secondComp)
firstComp - The first component to encodesecondComp - The second component to encodepublic byte[] parseLDAPComponent(java.lang.String ldapComponent)
ldapComponent - String containing the LDAP OIDpublic java.lang.String toString()
toString in class java.lang.Object
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.