public class OID extends Object implements Serializable
Constructor and Description |
---|
OID()
Creates a new OID object.
|
OID(byte[] oid)
Create a new OID object from a byte array
|
OID(String oid)
Create a new OID object from a String
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object oid) |
byte[] |
getOID()
Get an array of bytes from the OID
|
int |
getOIDLength()
Get the number of bytes necessary to store the OID
|
long[] |
getOIDValues()
Get an array of long from the OID
|
int |
hashCode() |
static boolean |
isOID(String oid)
Check that an OID is valid
|
void |
setOID(byte[] oid)
Set the OID.
|
void |
setOID(String oid)
Set the OID.
|
String |
toString()
Get the OID as a String
|
public OID()
public OID(byte[] oid) throws DecoderException
oid
- the byte array containing the OIDDecoderException
- if the byte array does not contain a
valid OIDpublic OID(String oid) throws DecoderException
oid
- The String which is supposed to be an OIDDecoderException
- if the byte array does not contain a
valid OIDpublic void setOID(byte[] oid) throws DecoderException
oid
- The bytes containing the OIDDecoderException
- if the byte array does not contains a valid OIDpublic void setOID(String oid) throws DecoderException
oid
- The String containing the OIDDecoderException
- if the byte array does not contains a valid OIDpublic long[] getOIDValues()
public int getOIDLength()
public byte[] getOID()
public static boolean isOID(String oid)
oid
- The oid to be checkedtrue
if the OID is validpublic String toString()
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.