public interface BytesMarshallable extends ReadBytesMarshallable, WriteBytesMarshallable
| Modifier and Type | Method and Description |
|---|---|
default String |
$toString()
Dumps the binary form of this object as a hex string for debugging.
|
default void |
readMarshallable(BytesIn<?> bytes)
Reads data from the provided
BytesIn object. |
default boolean |
usesSelfDescribingMessage()
Indicates whether the serialised form should contain enough metadata for a generic parser to
understand it without prior knowledge of the concrete type.
|
default void |
writeMarshallable(BytesOut<?> bytes)
Writes this object's state to
bytes using a custom binary format. |
default boolean usesSelfDescribingMessage()
usesSelfDescribingMessage in interface CommonMarshallabletrue by defaultdefault void readMarshallable(BytesIn<?> bytes) throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException, IllegalStateException, net.openhft.chronicle.core.io.InvalidMarshallableException
BytesIn object. Implementations of this method are
responsible for handling their own data reading logic based on the structure of the data
they expect to read.
Note: Implementations are also responsible for calling
Validatable.validate() when necessary.
readMarshallable in interface ReadBytesMarshallablebytes - The BytesIn instance to read data from.net.openhft.chronicle.core.io.IORuntimeException - If an I/O error occurs during reading.BufferUnderflowException - If there is not enough data in the buffer to read.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe waynet.openhft.chronicle.core.io.InvalidMarshallableException - If there is a problem with marshalling data,
such as incorrect format or type.IllegalStateExceptiondefault void writeMarshallable(BytesOut<?> bytes) throws IllegalStateException, BufferOverflowException, BufferUnderflowException, ArithmeticException, net.openhft.chronicle.core.io.InvalidMarshallableException
bytes using a custom binary format.
Implementations may validate their state prior to writing and throw
InvalidMarshallableException if invalid.writeMarshallable in interface WriteBytesMarshallablebytes - the target streamnet.openhft.chronicle.core.io.ClosedIllegalStateException - if the resource has been released or closednet.openhft.chronicle.core.io.ThreadingIllegalStateException - if accessed by multiple threads in an unsafe wayBufferOverflowException - if there is insufficient space in the buffernet.openhft.chronicle.core.io.InvalidMarshallableException - if the object is not in a valid state for serialisationIllegalStateExceptionBufferUnderflowExceptionArithmeticExceptiondefault String $toString()
Copyright © 2026 Chronicle Software Ltd. All rights reserved.