Class ASN1Oid

All Implemented Interfaces:
ASN1Constants

public class ASN1Oid
extends ASN1Primitive
This class represents ASN.1 Object Identifier type.
See Also:
ASN.1
  • Constructor Details

    • ASN1Oid

      public ASN1Oid()
      Constructs ASN.1 Object Identifier type The constructor is provided for inheritance purposes when there is a need to create a custom ASN.1 Object Identifier type. To get a default implementation it is recommended to use getInstance() method.
  • Method Details

    • getInstance

      public static ASN1Oid getInstance()
      Returns ASN.1 Object Identifier type default implementation The default implementation works with encoding that is represented as array of integers.
      Returns:
      ASN.1 Object Identifier type default implementation
    • decode

      public Object decode​(BerInputStream in) throws IOException
      Description copied from class: ASN1Type
      Decodes ASN.1 type.
      Specified by:
      decode in class ASN1Type
      Throws:
      IOException - if an I/O error occurs or the end of the stream is reached
    • getDecodedObject

      public Object getDecodedObject​(BerInputStream in) throws IOException
      Extracts array of integers from BER input stream.
      Overrides:
      getDecodedObject in class ASN1Type
      Returns:
      array of integers
      Throws:
      IOException
    • encodeContent

      public void encodeContent​(BerOutputStream out)
      Specified by:
      encodeContent in class ASN1Type
    • setEncodingContent

      public void setEncodingContent​(BerOutputStream out)
      Specified by:
      setEncodingContent in class ASN1Type
    • getInstanceForString

      public static ASN1Oid getInstanceForString()
      Returns ASN.1 Object Identifier type implementation This implementation works with encoding that is mapped to java.lang.String object.
      Returns:
      ASN.1 Object Identifier type implementation