corda / 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(bytes: ByteArray, internalOnly: Boolean = false)

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
internalOnly val internalOnly: Boolean

Inherited Properties

bytes val bytes: 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: Kryo = threadLocalP2PKryo()): WireTransaction
fun <T : Any> SerializedBytes<T>.deserialize(kryo: Kryo = if (internalOnly) threadLocalStorageKryo() else threadLocalP2PKryo()): T
sha256 fun OpaqueBytes.sha256(): SHA256