|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.asn1.AbstractDERType
org.ldaptive.asn1.OidType
public class OidType
Converts object identifiers to and from their DER encoded format.
| Constructor Summary | |
|---|---|
OidType(DERTag tag,
int[] item)
Creates a new oid type. |
|
OidType(DERTag tag,
String item)
Creates a new oid type. |
|
OidType(int[] item)
Creates a new oid type. |
|
OidType(String item)
Creates a new oid type. |
|
| Method Summary | |
|---|---|
static String |
decode(ByteBuffer encoded)
Converts bytes in the buffer to an OID by reading from the current position to the limit, which assumes the bytes of the integer are in big-endian order. |
byte[] |
encode()
Encode this object into it's DER type. |
protected static void |
isValid(int[] oid)
Checks whether the supplied oid is valid. |
static int[] |
parse(String oid)
Converts the supplied oid into an array on integers. |
protected static int |
readInt(ByteBuffer buffer)
Reads the necessary encoded bytes from the supplied buffer to create an integer. |
protected static byte[] |
toBytes(int component)
Converts the supplied oid component to a byte array. |
static byte[] |
toBytes(int[] oid)
Converts the supplied list of oid components to a byte array. |
| Methods inherited from class org.ldaptive.asn1.AbstractDERType |
|---|
encode, readBuffer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OidType(String item)
item - to DER encodepublic OidType(int[] item)
item - to DER encode
public OidType(DERTag tag,
String item)
tag - der tag associated with this typeitem - to DER encode
IllegalArgumentException - if the der tag is constructed
public OidType(DERTag tag,
int[] item)
tag - der tag associated with this typeitem - to DER encode
IllegalArgumentException - if the der tag is constructed| Method Detail |
|---|
public byte[] encode()
encode in interface DEREncoderpublic static String decode(ByteBuffer encoded)
encoded - buffer containing DER-encoded data where the buffer is
positioned at the start of OID bytes and the limit is set beyond the last
byte of OID data.
public static byte[] toBytes(int[] oid)
oid - to convert
IllegalArgumentException - if the oid is not valid. See isValid(int[])protected static void isValid(int[] oid)
oid - to check
IllegalArgumentException - if the oid is not valid.protected static byte[] toBytes(int component)
component - to convert to bytes
protected static int readInt(ByteBuffer buffer)
buffer - to read
public static int[] parse(String oid)
oid - to parse
IllegalArgumentException - if the oid is not valid. See isValid(int[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||