net.corda.core.serialization / SerializedBytes

# SerializedBytes

`class SerializedBytes<T : Any> : OpaqueBytes`

A type safe wrapper around a byte array that contains a serialised object. You can call SerializedBytes.deserialize to get the original object back.

### Constructors

<init> | `SerializedBytes(bits: ByteArray)` A type safe wrapper around a byte array that contains a serialised object. You can call SerializedBytes.deserialize to get the original object back.

### Properties

hash | `val hash: SecureHash`

### Inherited Properties

bits | `val bits: ByteArray`
size | `val size: Int`

### Functions

writeToFile | `fun writeToFile(path: Path): Path`

### Inherited Functions

equals | `open fun equals(other: Any?): Boolean`
hashCode | `open fun hashCode(): Int`
open | `fun open(): ByteArrayInputStream` Returns a ByteArrayInputStream of the bytes
toString | `open fun toString(): String`

### Extension Functions

deserialize | `fun SerializedBytes<WireTransaction>.deserialize(kryo: <ERROR CLASS> = THREAD_LOCAL_KRYO.get()): WireTransaction` `fun <T : Any> SerializedBytes<T>.deserialize(kryo: <ERROR CLASS> = THREAD_LOCAL_KRYO.get()): T` `fun <T : Any> OpaqueBytes.deserialize(kryo: <ERROR CLASS> = THREAD_LOCAL_KRYO.get()): T`
sha256 | `fun OpaqueBytes.sha256(): SHA256`