Package com.oss.asn1

Class OctetString

All Implemented Interfaces:
com.oss.asn1.Sizeable, Serializable, Cloneable
Direct Known Subclasses:
ContainingOctetString

public class OctetString extends AbstractBinary implements com.oss.asn1.Sizeable
The OctetString class represents the ASN.1 OCTET STRING type.
Since:
ASN.1/Java 6.0
See Also:
  • Constructor Details

    • OctetString

      public OctetString()
      The default constructor.
    • OctetString

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

    • clone

      public OctetString clone()
      Clone 'this' object.
      Overrides:
      clone in class AbstractBinary
      Returns:
      deep copy of 'this' object.
    • getSize

      public final int getSize()
      Get the number of octets in the OctetString.
      Specified by:
      getSize in interface com.oss.asn1.Sizeable
      Returns:
      integer value indicating the number of octets.
    • equalTo

      public final boolean equalTo(OctetString that)
      Compare 'this' object to another OctetString object to see if their contents are the same.
      Parameters:
      that - the OctetString object to compare 'this' object to.
      Returns:
      true if contents of both objects are the same.
    • getTypeName

      public String getTypeName()
      Returns the name of ASN.1 type this java class represents.
      Overrides:
      getTypeName in class AbstractData
      Returns:
      the name of the ASN.1 type.