| |
|
| java.lang.Object org.apache.harmony.security.asn1.ObjectIdentifier
ObjectIdentifier | final public class ObjectIdentifier (Code) | | Instance of this class represents ObjectIdentifier (OID).
According to X.690:
OID is represented as a sequence of subidentifier.
Each subidentifier is represented as non negative integer value.
There are at least 2 subidentifiers in the sequence.
Valid values for first subidentifier are 0, 1 and 2.
If the first subidentifier has 0 or 1 value the second
subidentifier must be less then 40.
See Also: http://asn1.elibel.tm.fr/en/standards/index.htm |
Constructor Summary | |
public | ObjectIdentifier(int[] oid) Creates ObjectIdentifier(OID) from array of integers. | public | ObjectIdentifier(String strOid) Creates ObjectIdentifier(OID) from string representation. |
Method Summary | |
public boolean | equals(Object o) Compares object with OID for equality. | public int[] | getOid() Returns array of integers. | public int | hashCode() | public static int[] | toIntArray(String str) Gets ObjectIdentifier (OID) from string representation. | public String | toString() | public static String | toString(int[] oid) Returns string representation of OID.
Note: it is supposed that passed array of integers
contains valid OID value, so no checks are performed. | public static void | validate(int[] oid) Validates ObjectIdentifier (OID). |
ObjectIdentifier | public ObjectIdentifier(int[] oid)(Code) | | Creates ObjectIdentifier(OID) from array of integers.
Parameters: oid - - array of integers throws: IllegalArgumentException - - if oid is invalid or null |
ObjectIdentifier | public ObjectIdentifier(String strOid)(Code) | | Creates ObjectIdentifier(OID) from string representation.
Parameters: strOid - - oid string throws: IllegalArgumentException - - if oid string is invalid or null |
equals | public boolean equals(Object o)(Code) | | Compares object with OID for equality.
true if object is ObjectIdentifier and it has the samerepresentation as array of integers, otherwise false |
getOid | public int[] getOid()(Code) | | Returns array of integers.
array of integers |
toIntArray | public static int[] toIntArray(String str)(Code) | | Gets ObjectIdentifier (OID) from string representation.
String representation is defined by the following syntax:
OID = subidentifier 1*("." subidentifier)
subidentifier = 1*(digit)
Parameters: oidString - - string representation of OID - oid as array of integers throws: IllegalArgumentException - - if oid string is invalid or null |
toString | public static String toString(int[] oid)(Code) | | Returns string representation of OID.
Note: it is supposed that passed array of integers
contains valid OID value, so no checks are performed.
Parameters: oid - - oid as array of integers oid string representation |
validate | public static void validate(int[] oid)(Code) | | Validates ObjectIdentifier (OID).
Parameters: oid - - oid as array of integers throws: IllegalArgumentException - - if oid is invalid or null |
|
|
|