org.ietf.jgss
Class Oid

java.lang.Object
  extended byorg.ietf.jgss.Oid

public class Oid
extends java.lang.Object

This class represents Universal Object Identifiers (Oids) and their associated operations.

Oids are hierarchically globally-interpretable identifiers used within the GSS-API framework to identify mechanisms and name formats.

The structure and encoding of Oids is defined in ISOIEC-8824 and ISOIEC-8825. For example the Oid representation of Kerberos V5 mechanism is "1.2.840.113554.1.2.2"

The GSSName name class contains public static Oid objects representing the standard name types defined in GSS-API.

Component:
Security-Core

Constructor Summary
Oid(byte[] derOid)
          Creates an Oid object from its DER encoding.
Oid(java.io.InputStream derOid)
          Creates an Oid object from its DER encoding.
Oid(java.lang.String strOid)
          Creates an Oid object from a string representation of its integer components (e.g.
 
Method Summary
 boolean containedIn(Oid[] oids)
          An utility method to test if an Oid object is contained within the supplied Oid object array.
 boolean equals(java.lang.Object obj)
          Returns "true" if the two Oid objects represent the same oid value.
 byte[] getDER()
          Returns the full ASN.1 DER encoding for this oid object, which includes the tag and length.
 int hashCode()
           
 java.lang.String toString()
          Returns a string representation of the oid's integer components in dot separated notation (e.g.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Oid

public Oid(java.lang.String strOid)
    throws GSSException
Creates an Oid object from a string representation of its integer components (e.g. "1.2.840.113554.1.2.2").

Parameters:
strOid - The string representation for the oid.
Throws:
GSSException - may be thrown when the string is incorrectly formatted

Oid

public Oid(java.io.InputStream derOid)
    throws GSSException
Creates an Oid object from its DER encoding. This refers to the full encoding including tag and length. The structure and encoding of Oids is defined in ISOIEC-8824 and ISOIEC-8825. This method is identical in functionality to its byte array counterpart.

Parameters:
derOid - Stream containing the DER encoded oid.

Oid

public Oid(byte[] derOid)
    throws GSSException
Creates an Oid object from its DER encoding. This refers to the full encoding including tag and length. The structure and encoding of Oids is defined in ISOIEC-8824 and ISOIEC-8825. This method is identical in functionality to its byte array counterpart.

Parameters:
derOid - Byte array storing a DER encoded oid.
Method Detail

toString

public java.lang.String toString()
Returns a string representation of the oid's integer components in dot separated notation (e.g. "1.2.840.113554.1.2.2").


equals

public boolean equals(java.lang.Object obj)
Returns "true" if the two Oid objects represent the same oid value. (Note that the Java language specification requires that two objects that are equal according to the equals(Object) method must return the same integer result when the hashCode() method is called on them.)

Parameters:
obj - Another Oid object to compare with.

hashCode

public int hashCode()

getDER

public byte[] getDER()
Returns the full ASN.1 DER encoding for this oid object, which includes the tag and length.


containedIn

public boolean containedIn(Oid[] oids)
An utility method to test if an Oid object is contained within the supplied Oid object array.

Parameters:
oids - An array of oids to search.