BEROctetString (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.asn1

## Class BEROctetString

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.ASN1Primitive
    - - org.bouncycastle.asn1.ASN1OctetString
      - - org.bouncycastle.asn1.BEROctetString

- All Implemented Interfaces:
    ASN1Encodable, ASN1OctetStringParser, InMemoryRepresentable, Encodable
  Direct Known Subclasses:
    BERConstructedOctetString

      public class BEROctetString
      extends ASN1OctetString

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BEROctetString(ASN1OctetString[] octs)`
    `BEROctetString(byte[] string)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `encode(ASN1OutputStream out)`
    `java.util.Enumeration` | `getObjects()` return the DER octets that make up this string.
    `byte[]` | `getOctets()` Return the content of the OCTET STRING as a byte array.

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1OctetString

      `getInstance, getInstance, getLoadedObject, getOctetStream, hashCode, parser, toString`

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Primitive

      `equals, fromByteArray, toASN1Primitive`

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Object

      `getEncoded, getEncoded, hasEncodedTagValue, toASN1Object`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.bouncycastle.asn1.ASN1Encodable

      `toASN1Primitive`

- - ### Constructor Detail

    - #### BEROctetString

          public BEROctetString(byte[] string)

      Parameters:
        `string` - the octets making up the octet string.

    - #### BEROctetString

          public BEROctetString(ASN1OctetString[] octs)

  - ### Method Detail

    - #### getOctets

          public byte[] getOctets()

      Description copied from class: `ASN1OctetString`
      Return the content of the OCTET STRING as a byte array.
      Overrides:
        `getOctets` in class `ASN1OctetString`
      Returns:
        the byte[] representing the OCTET STRING's content.

    - #### getObjects

          public java.util.Enumeration getObjects()

      return the DER octets that make up this string.

    - #### encode

          public void encode(ASN1OutputStream out)
                      throws java.io.IOException

      Throws:
        `java.io.IOException`