net.corda.core.serialization

## Class OpaqueBytes

- net.corda.core.serialization.OpaqueBytes

- Direct Known Subclasses:
    DigitalSignature, SecureHash, SerializedBytes

      public class OpaqueBytes

  A simple class that wraps a byte array and makes the equals/hashCode/toString methods work as you actually expect. In an ideal JVM this would be a value type and be completely overhead free. Project Valhalla is adding such functionality to Java, but it won't arrive for a few years yet!

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `OpaqueBytes.Companion`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static OpaqueBytes.Companion` | `Companion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OpaqueBytes(byte[] bytes)` A simple class that wraps a byte array and makes the equals/hashCode/toString methods work as you actually expect. In an ideal JVM this would be a value type and be completely overhead free. Project Valhalla is adding such functionality to Java, but it won't arrive for a few years yet!

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object other)`
    `byte[]` | `getBytes()`
    `int` | `getSize()`
    `int` | `hashCode()`
    `java.io.ByteArrayInputStream` | `open()` Returns a ByteArrayInputStream of the bytes
    `java.lang.String` | `toString()`

- - ### Field Detail

    - #### Companion

          public static OpaqueBytes.Companion Companion

  - ### Constructor Detail

    - #### OpaqueBytes

          public OpaqueBytes(byte[] bytes)

      A simple class that wraps a byte array and makes the equals/hashCode/toString methods work as you actually expect. In an ideal JVM this would be a value type and be completely overhead free. Project Valhalla is adding such functionality to Java, but it won't arrive for a few years yet!

  - ### Method Detail

    - #### equals

          public boolean equals(java.lang.Object other)

    - #### hashCode

          public int hashCode()

    - #### toString

          public java.lang.String toString()

    - #### getSize

          public int getSize()

    - #### open

          public java.io.ByteArrayInputStream open()

      Returns a ByteArrayInputStream of the bytes

      See Also:
        ByteArrayInputStream

    - #### getBytes

          public byte[] getBytes()