public class OID
extends java.lang.Object
implements java.security.spec.AlgorithmParameterSpec, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static char |
CHAR_SEPARATOR
separator character between sequence of sub-identifiers.
|
static int |
DEFAULT_STRING_LENGTH
approximate length of string representation, for example "1.2.643.2.2.19"
|
static java.lang.String |
SPLIT_POINT
string of "
|
Constructor and Description |
---|
OID(int[] oid)
ctor. creating from sequence of sub-identifiers
|
OID(OID oid)
Copy ctor.
|
OID(java.lang.String s)
create new oid object from string representation.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object.
|
boolean |
equals(java.lang.Object obj)
inherited comparison.
|
static int |
getInt(char[] chars,
int first,
int last) |
int |
hashCode()
Returns a hash code value for the object..
|
boolean |
isEquals(int[] v)
comparison with int array.
|
boolean |
isEquals(OID v)
oid comparison.
|
boolean |
isEquals(java.lang.String str)
comparison with string.
|
static int[] |
parse(java.lang.String str)
parse strings such as "1.2.643.2.2.19" to int[]
|
java.lang.String |
toString()
get string representation such as "1.2.643.2.2.19" from oid.
|
public static final char CHAR_SEPARATOR
public static final java.lang.String SPLIT_POINT
public static final int DEFAULT_STRING_LENGTH
public OID(int[] oid)
oid
- sequence of sub-identifierspublic OID(OID oid)
oid
- object to copy.public OID(java.lang.String s)
s
- string representation of oidpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean isEquals(OID v)
v
- OID to compare withpublic boolean isEquals(int[] v)
v
- int form to compare withpublic boolean isEquals(java.lang.String str)
str
- string form to compare withpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the reference object with which to compare.true
if this object is the same as the obj argument; false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
Object.equals(java.lang.Object)
,
Hashtable
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the object's class does not support the Cloneable
interface.Cloneable
public static int[] parse(java.lang.String str)
str
- strings such as "1.2.643.2.2.19"public static int getInt(char[] chars, int first, int last)