Package com.oss.asn1

Class AbstractObjectIdentifier

java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.AbstractObjectIdentifier
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ObjectIdentifier, RelativeObjectIdentifier

public abstract class AbstractObjectIdentifier extends AbstractData
The AbstractObjectIdentifier class is a common superclass for the representations of the ASN.1 OBJECT IDENTIFIER and RELATIVE-OID types.
Since:
ASN.1/Java 1.0-beta A
See Also:
  • Constructor Details

    • AbstractObjectIdentifier

      public AbstractObjectIdentifier()
      The default constructor.
    • AbstractObjectIdentifier

      public AbstractObjectIdentifier(String valueNotation, boolean relative) throws BadObjectIdentifierException
      Construct from a String. The String can contain ASN.1 Value Notation in the format: "{ 1 2 3 4 5 6 7 }" or in the format "1.2.3.4.5.6.7". With the first format, the blanks after the '{' and before the '}' are optional. If the string has some extra characters before the '{' or after the '}', they are simply ignored.
      Parameters:
      valueNotation - the value to set this object's value to.
      relative - indicates if the OID being constructed is a relative object identifier.
      Throws:
      BadObjectIdentifierException - thrown if the String parameter does not contain valid ASN.1 Value Notation
    • AbstractObjectIdentifier

      public AbstractObjectIdentifier(byte[] value)
      Construct from a byte array.
      Parameters:
      value - the byte array value to set 'this' object to.
  • Method Details

    • setValue

      public final void setValue(byte[] value)
      Set the value of 'this' object to a byte array.
      Parameters:
      value - the byte array value to set 'this' object to.
    • byteArrayValue

      public final byte[] byteArrayValue()
      Get the value of 'this' object as a byte array
      Returns:
      value of this object as the array of bytes.
    • clone

      public Object clone()
      Clone 'this' object.
      Overrides:
      clone in class AbstractData
      Returns:
      deep copy of 'this' object.
    • hashCode

      public int hashCode()
      Returns a hash code for this object
      Overrides:
      hashCode in class AbstractData
      Returns:
      a hash code for this object
    • delete

      public void delete()
      Destroy the instance of the AbstractData. The contract of this method is to facilitate garbage collection by explicit destruction of the data that is no longer needed.
      Overrides:
      delete in class AbstractData