public enum Wires extends Enum<Wires>
This enum does not contain any enumeration values. It acts as a
central hub for header flags and masks, static utility methods for
common wire operations, and management of reusable resources such as
StringBuilder pools and CachedCompiler
instances.
| Modifier and Type | Field and Description |
|---|---|
static List<Function<Class<?>,SerializationStrategy>> |
CLASS_STRATEGY_FUNCTIONS
Registry of functions that determine the
SerializationStrategy for a class. |
static int |
END_OF_DATA
Combination of
NOT_COMPLETE and META_DATA used to indicate no more data
is expected, for example at end of a roll. |
static boolean |
GENERATE_TUPLES
Flag indicating whether tuple generation is permitted via the
wire.generate.tuples system property. |
static int |
LENGTH_MASK
Mask for extracting the length from a 4 byte header.
|
static int |
META_DATA
Flag (
0x4000_0000) marking the document as meta-data rather than data. |
static net.openhft.chronicle.bytes.Bytes<?> |
NO_BYTES
Shared immutable
Bytes instance representing an empty buffer. |
static int |
NOT_COMPLETE
Flag (
0x8000_0000) indicating that the following message is not yet complete. |
static int |
NOT_COMPLETE_UNKNOWN_LENGTH
Combination of
NOT_COMPLETE and UNKNOWN_LENGTH for incomplete messages
of unknown size. |
static int |
NOT_INITIALIZED
Value used for an uninitialised header (
0). |
static int |
SPB_HEADER_SIZE
Size in bytes of a Size-Prefixed Blob (SPB) header.
|
static int |
UNKNOWN_LENGTH
Value representing an unknown length (
0). |
| Modifier and Type | Method and Description |
|---|---|
static net.openhft.chronicle.core.scoped.ScopedResource<Wire> |
acquireBinaryWireScoped()
Obtains a pooled
BinaryWire wrapped in a ScopedResource
for temporary serialisation tasks. |
static @NotNull net.openhft.chronicle.core.scoped.ScopedResource<net.openhft.chronicle.bytes.Bytes<Void>> |
acquireBytesScoped()
Provides a pooled
Bytes instance wrapped in a ScopedResource. |
static boolean |
acquireLock(@NotNull net.openhft.chronicle.bytes.BytesStore<?,?> store,
long position)
Attempts to claim a 4 byte header by atomically swapping
NOT_INITIALIZED with NOT_COMPLETE. |
static net.openhft.chronicle.core.scoped.ScopedResource<StringBuilder> |
acquireStringBuilderScoped()
Obtains a
StringBuilder from the thread-local pool wrapped in a
ScopedResource so it is automatically returned when the scope is closed. |
static net.openhft.chronicle.bytes.Bytes<?> |
asBinary(@NotNull WireIn wireIn,
net.openhft.chronicle.bytes.Bytes<?> output)
Copies the contents of
wireIn into output using a binary wire. |
static net.openhft.chronicle.bytes.Bytes<?> |
asJson(@NotNull WireIn wireIn,
net.openhft.chronicle.bytes.Bytes<?> output)
Converts
wireIn to JSON and writes the result into output. |
static @NotNull CharSequence |
asText(@NotNull WireIn wireIn,
net.openhft.chronicle.bytes.Bytes<?> output)
Converts the contents of
wireIn to a text (YAML-like) representation. |
static @NotNull BinaryWire |
binaryWireForRead(net.openhft.chronicle.bytes.Bytes<?> in,
long position,
long length)
Provides a thread-local
BinaryWire configured to read from the supplied
byte store. |
static @NotNull BinaryWire |
binaryWireForWrite(net.openhft.chronicle.bytes.Bytes<?> in,
long position,
long length)
Provides a thread-local
BinaryWire configured for writing to the supplied
byte store. |
static <T> T |
copyTo(Object source,
T target)
Copy fields from source to target by marshalling out and then in.
|
static <T extends Marshallable> |
deepCopy(T marshallable)
Creates a deep copy of the provided marshallable object.
|
static boolean |
dtoInterface(Class<?> clazz)
Determines if the provided class is an interface and qualifies as a DTO (Data Transfer Object).
|
static boolean |
exceedsMaxLength(long length)
Checks if the given length exceeds the maximum allowed length.
|
static FieldInfo |
fieldInfo(@NotNull Class<?> aClass,
String name)
Retrieves field information for a specific field of a given class.
|
static @NotNull Map<String,FieldInfo> |
fieldInfoMap(@NotNull Class<?> aClass)
Retrieves a map of field names to their information for a given class.
|
static @NotNull List<FieldInfo> |
fieldInfos(@NotNull Class<?> aClass)
Retrieves the list of field information for a given class.
|
static String |
fromAlignedSizePrefixedBlobs(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes)
Dumps aligned size-prefixed blobs.
|
static String |
fromSizePrefixedBlobs(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes)
Dumps a sequence of size-prefixed binary messages as a human readable
string.
|
static String |
fromSizePrefixedBlobs(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes,
boolean abbrev)
Dumps size-prefixed blobs with optional abbreviation of long content.
|
static String |
fromSizePrefixedBlobs(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes,
boolean padding,
boolean abbrev)
Dumps size-prefixed blobs with control over padding and abbreviation.
|
static String |
fromSizePrefixedBlobs(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes,
long position)
Dumps size-prefixed blobs starting at a given position.
|
static String |
fromSizePrefixedBlobs(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes,
long position,
boolean padding)
Dumps size-prefixed blobs from a given position with optional padding.
|
static String |
fromSizePrefixedBlobs(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes,
long position,
long length)
Creates a string representation of a specific portion of size-prefixed blob data.
|
static String |
fromSizePrefixedBlobs(@NotNull DocumentContext dc)
Dumps the current document of the supplied
DocumentContext as a
sequence of size-prefixed blobs. |
static String |
fromSizePrefixedBlobs(@NotNull WireIn wireIn)
Dumps the messages from a
WireIn as a human readable string. |
static String |
fromSizePrefixedBlobs(@NotNull WireIn wireIn,
boolean abbrev)
Dumps the messages from a
WireIn with optional abbreviation. |
static <T> T |
getField(@NotNull Object o,
String name,
Class<T> tClass)
Retrieves the value of a specific field from an object and converts it to the desired type.
|
static long |
getLongField(@NotNull Object o,
String name)
Retrieves the long value of a specific field from an object.
|
static void |
init()
A utility method to force the static initialization of this enum.
|
static boolean |
isData(int len)
Returns
true if the header denotes data rather than meta-data. |
static boolean |
isEndOfFile(int num)
Returns
true if the supplied header value denotes end of data. |
static boolean |
isEquals(@NotNull Object o1,
@NotNull Object o2)
Checks if two objects are of the same type and equal based on their serialized representation.
|
static boolean |
isInternal(@NotNull Object value)
Determines if the value's package name is internal to Java.
|
static boolean |
isKnownLength(int len)
Returns
true if the header has a definite length value. |
static boolean |
isNotComplete(int header)
Returns
true if the header indicates an incomplete document or zero length. |
static boolean |
isNotInitialized(int len)
Returns
true if the header has not been initialised. |
static boolean |
isReady(int header)
Returns
true if the header denotes a complete document. |
static boolean |
isReadyData(int header)
Tests whether a header represents completed data (not meta-data) and is non-zero.
|
static boolean |
isReadyMetaData(int len)
Returns
true if the header is marked as meta-data and the document is complete. |
static int |
lengthOf(int len)
Extracts the pure length from a 4 byte header value, removing
flags such as
NOT_COMPLETE and META_DATA. |
static <E> E |
object0(ValueIn in,
E using,
@Nullable Class<? extends E> clazz)
Reads and validates an object from the given input.
|
static <E> E |
object0(ValueIn in,
E using,
@Nullable Class<? extends E> clazz,
boolean bestEffort)
Deserialize an object from the provided input and validate it.
|
static <E> E |
object1(ValueIn in,
E using,
@Nullable Class<? extends E> clazz,
boolean bestEffort)
Deserialize an object from the provided input based on the defined strategy and constraints.
|
static <E> E |
objectDate(ValueIn in,
E using)
Reads a date object from the given input.
|
static <E> E |
objectMap(ValueIn in,
E using,
@Nullable Class<? extends E> clazz,
@NotNull SerializationStrategy strategy)
Reads a map of objects from the given input, using a specified serialization strategy.
|
static <E> E |
objectSequence(ValueIn in,
E using,
@Nullable Class<? extends E> clazz,
SerializationStrategy strategy)
Reads a sequence of objects using a specified serialization strategy.
|
static <T> T |
project(Class<T> tClass,
Object source)
Projects the source object's fields into a new instance of a specified class.
|
static void |
readMarshallable(Class<?> clazz,
@NotNull Object marshallable,
@NotNull WireIn wire,
boolean overwrite)
Reads a Marshallable object's fields from a WireIn instance using a specified class type.
|
static void |
readMarshallable(@NotNull Object marshallable,
@NotNull WireIn wire,
boolean overwrite)
Reads a Marshallable object's fields from a WireIn instance.
|
static long |
readWire(@NotNull WireIn wireIn,
long size,
@NotNull ReadMarshallable readMarshallable)
Reads data from a WireIn up to a specified size using a ReadMarshallable instance.
|
static <T> T |
recordAsYaml(Class<T> tClass,
PrintStream ps)
Creates and returns a proxy of the specified interface.
|
static int |
removeMaskedTidFromHeader(int header)
Removes masked thread ID from a given header.
|
static void |
replay(String file,
Object obj)
Reads the content of a specified Yaml file and replays the serialized method calls
to the specified object.
|
static void |
reset(@NotNull Object o)
Resets the specified object's state to its default.
|
static void |
setField(@NotNull Object o,
String name,
Object value)
Sets the value of a specific field in an object.
|
static void |
setLongField(@NotNull Object o,
String name,
long value)
Sets the long value of a specific field in an object.
|
static int |
toIntU30(long l,
@NotNull String error)
Converts
l to a 30 bit unsigned int. |
static <T> T |
tupleFor(Class<T> tClass,
String typeName)
Returns a tuple for the specified class and type name.
|
static String |
typeNameFor(net.openhft.chronicle.core.pool.ClassLookup classLookup,
@NotNull Object value)
Fetches the type name for the provided object using the specified class lookup mechanism.
|
static String |
typeNameFor(@NotNull Object value)
Fetches the type name for the provided object using a default class alias pool.
|
static Wires |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Wires[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static <T extends WriteMarshallable> |
writeData(@NotNull WireOut wireOut,
T writer)
Writes data to the given WireOut using the provided writer.
|
static void |
writeKey(@NotNull Object marshallable,
net.openhft.chronicle.bytes.Bytes<?> bytes)
Writes the key associated with the marshallable object to the provided bytes.
|
static void |
writeMarshallable(@NotNull Object marshallable,
@NotNull WireOut wire)
Writes a marshallable object's fields to a WireOut instance.
|
static void |
writeMarshallable(@NotNull Object marshallable,
@NotNull WireOut wire,
boolean writeDefault)
Writes a marshallable object's fields to a WireOut instance with an option to use defaults.
|
static void |
writeMarshallable(@NotNull Object marshallable,
@NotNull WireOut wire,
@NotNull Object previous,
boolean copy)
Writes a marshallable object's fields to a WireOut instance considering previous state.
|
public static final int LENGTH_MASK
public static final int NOT_COMPLETE
0x8000_0000) indicating that the following message is not yet complete.
Used in the length prefix of a size-prefixed blob.public static final int META_DATA
0x4000_0000) marking the document as meta-data rather than data.public static final int UNKNOWN_LENGTH
0).public static final int NOT_COMPLETE_UNKNOWN_LENGTH
NOT_COMPLETE and UNKNOWN_LENGTH for incomplete messages
of unknown size.public static final int END_OF_DATA
NOT_COMPLETE and META_DATA used to indicate no more data
is expected, for example at end of a roll.public static final int NOT_INITIALIZED
0).public static final net.openhft.chronicle.bytes.Bytes<?> NO_BYTES
Bytes instance representing an empty buffer.public static final int SPB_HEADER_SIZE
public static final List<Function<Class<?>,SerializationStrategy>> CLASS_STRATEGY_FUNCTIONS
SerializationStrategy for a class.public static boolean GENERATE_TUPLES
wire.generate.tuples system property.public static Wires[] values()
for (Wires c : Wires.values()) System.out.println(c);
public static Wires valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static void init()
public static <T> T recordAsYaml(Class<T> tClass, PrintStream ps)
T - the type of the specified interfacetClass - the specified interface class to create a proxy ofps - the PrintStream used to write serialized method calls into, in Yaml formatpublic static void replay(String file, Object obj) throws IOException, net.openhft.chronicle.core.io.InvalidMarshallableException
file - the name of the input Yaml file containing serialized method callsobj - the target object that the method calls will be replayed onIOException - is thrown if there's an error reading the filenet.openhft.chronicle.core.io.InvalidMarshallableException - is thrown if the serialized data is invalid or corruptedpublic static String fromSizePrefixedBlobs(@NotNull @NotNull net.openhft.chronicle.bytes.Bytes<?> bytes)
bytes - the bytes containing the size-prefixed datapublic static String fromAlignedSizePrefixedBlobs(@NotNull @NotNull net.openhft.chronicle.bytes.Bytes<?> bytes)
bytes - the bytes containing the aligned blobspublic static String fromSizePrefixedBlobs(@NotNull @NotNull net.openhft.chronicle.bytes.Bytes<?> bytes, boolean abbrev)
bytes - the bytes containing the messagesabbrev - if true long fields are abbreviatedpublic static String fromSizePrefixedBlobs(@NotNull @NotNull net.openhft.chronicle.bytes.Bytes<?> bytes, long position)
bytes - the bytes containing the messagesposition - the offset in bytes to begin dumpingpublic static String fromSizePrefixedBlobs(@NotNull @NotNull net.openhft.chronicle.bytes.Bytes<?> bytes, long position, boolean padding)
bytes - the bytes containing the messagesposition - start position in bytespadding - whether message boundaries are paddedpublic static String fromSizePrefixedBlobs(@NotNull @NotNull net.openhft.chronicle.bytes.Bytes<?> bytes, boolean padding, boolean abbrev)
bytes - the bytes containing the messagespadding - whether message boundaries are paddedabbrev - whether long content should be abbreviatedpublic static String fromSizePrefixedBlobs(@NotNull @NotNull DocumentContext dc)
DocumentContext as a
sequence of size-prefixed blobs. Both TextWire and
BinaryWire contexts are supported.dc - the document context whose content should be dumpedpublic static String fromSizePrefixedBlobs(@NotNull @NotNull WireIn wireIn)
WireIn as a human readable string.wireIn - the input wirepublic static String fromSizePrefixedBlobs(@NotNull @NotNull WireIn wireIn, boolean abbrev)
WireIn with optional abbreviation.wireIn - the input wireabbrev - whether long content should be abbreviated@NotNull public static @NotNull CharSequence asText(@NotNull @NotNull WireIn wireIn, net.openhft.chronicle.bytes.Bytes<?> output)
wireIn to a text (YAML-like) representation.wireIn - the source wireoutput - buffer to receive the textoutput containing the textual formpublic static net.openhft.chronicle.bytes.Bytes<?> asBinary(@NotNull
@NotNull WireIn wireIn,
net.openhft.chronicle.bytes.Bytes<?> output)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
wireIn into output using a binary wire.net.openhft.chronicle.core.io.InvalidMarshallableExceptionpublic static net.openhft.chronicle.bytes.Bytes<?> asJson(@NotNull
@NotNull WireIn wireIn,
net.openhft.chronicle.bytes.Bytes<?> output)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
wireIn to JSON and writes the result into output.net.openhft.chronicle.core.io.InvalidMarshallableExceptionpublic static net.openhft.chronicle.core.scoped.ScopedResource<StringBuilder> acquireStringBuilderScoped()
StringBuilder from the thread-local pool wrapped in a
ScopedResource so it is automatically returned when the scope is closed.public static int lengthOf(int len)
NOT_COMPLETE and META_DATA.public static boolean isReady(int header)
true if the header denotes a complete document.public static boolean isNotComplete(int header)
true if the header indicates an incomplete document or zero length.public static boolean isReadyData(int header)
public static boolean isData(int len)
true if the header denotes data rather than meta-data.public static boolean isReadyMetaData(int len)
true if the header is marked as meta-data and the document is complete.public static boolean isKnownLength(int len)
true if the header has a definite length value.public static boolean isNotInitialized(int len)
true if the header has not been initialised.public static int toIntU30(long l,
@NotNull
@NotNull String error)
l to a 30 bit unsigned int.l - the value to converterror - error message used if l is outside 0..LENGTH_MASKl as an intIllegalStateException - if l is out of rangepublic static boolean acquireLock(@NotNull
@NotNull net.openhft.chronicle.bytes.BytesStore<?,?> store,
long position)
NOT_INITIALIZED with NOT_COMPLETE.store - bytes containing the headerposition - offset of the headertrue if the lock was acquiredpublic static boolean exceedsMaxLength(long length)
length - the length to checkpublic static <T extends WriteMarshallable> long writeData(@NotNull @NotNull WireOut wireOut, @NotNull T writer) throws net.openhft.chronicle.core.io.InvalidMarshallableException
wireOut - the destination to write datawriter - the WriteMarshallable instance to write datanet.openhft.chronicle.core.io.InvalidMarshallableException - if marshalling failspublic static long readWire(@NotNull
@NotNull WireIn wireIn,
long size,
@NotNull
@NotNull ReadMarshallable readMarshallable)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
wireIn - the source from which data is readsize - the maximum size of data to be readreadMarshallable - the ReadMarshallable instance to interpret the datanet.openhft.chronicle.core.io.InvalidMarshallableException - if there's an issue during marshalling@NotNull public static @NotNull net.openhft.chronicle.core.scoped.ScopedResource<net.openhft.chronicle.bytes.Bytes<Void>> acquireBytesScoped()
Bytes instance wrapped in a ScopedResource.public static net.openhft.chronicle.core.scoped.ScopedResource<Wire> acquireBinaryWireScoped()
BinaryWire wrapped in a ScopedResource
for temporary serialisation tasks.public static String fromSizePrefixedBlobs(@NotNull @NotNull net.openhft.chronicle.bytes.Bytes<?> bytes, long position, long length)
bytes - the source of the blob dataposition - the starting position for extractionlength - the length of data to extractpublic static void readMarshallable(@NotNull
@NotNull Object marshallable,
@NotNull
@NotNull WireIn wire,
boolean overwrite)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
marshallable - the object whose fields need to be populatedwire - the source from which data will be readoverwrite - a flag indicating whether existing fields should be overwrittennet.openhft.chronicle.core.io.InvalidMarshallableException - if there's an issue during the marshalling processpublic static void readMarshallable(Class<?> clazz, @NotNull @NotNull Object marshallable, @NotNull @NotNull WireIn wire, boolean overwrite) throws net.openhft.chronicle.core.io.InvalidMarshallableException
clazz - the class type of the Marshallable objectmarshallable - the object whose fields need to be populatedwire - the source from which data will be readoverwrite - a flag indicating whether existing fields should be overwrittennet.openhft.chronicle.core.io.InvalidMarshallableException - if there's an issue during the marshalling processpublic static void writeMarshallable(@NotNull
@NotNull Object marshallable,
@NotNull
@NotNull WireOut wire)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
marshallable - the object whose fields are to be writtenwire - the target WireOut to write data tonet.openhft.chronicle.core.io.InvalidMarshallableException - if there's an error during the marshalling processpublic static void writeMarshallable(@NotNull
@NotNull Object marshallable,
@NotNull
@NotNull WireOut wire,
boolean writeDefault)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
marshallable - the object to be writtenwire - the target WireOut to write data towriteDefault - indicates if default values should be writtennet.openhft.chronicle.core.io.InvalidMarshallableException - if there's an error during the marshalling processpublic static void writeMarshallable(@NotNull
@NotNull Object marshallable,
@NotNull
@NotNull WireOut wire,
@NotNull
@NotNull Object previous,
boolean copy)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
marshallable - the object to be writtenwire - the target WireOut to write data toprevious - the previous state of the marshallable objectcopy - indicates if the previous state should be copiednet.openhft.chronicle.core.io.InvalidMarshallableException - if there's an error during the marshalling processpublic static void writeKey(@NotNull
@NotNull Object marshallable,
net.openhft.chronicle.bytes.Bytes<?> bytes)
marshallable - the object whose key needs to be writtenbytes - the target bytes to write the key to@NotNull public static <T extends Marshallable> T deepCopy(@NotNull T marshallable) throws net.openhft.chronicle.core.io.InvalidMarshallableException
T - the type of marshallable objectmarshallable - the object to be deeply copiednet.openhft.chronicle.core.io.InvalidMarshallableException - if there's an error during the copy process@NotNull public static <T> T copyTo(Object source, @NotNull T target) throws net.openhft.chronicle.core.io.InvalidMarshallableException
T - target typesource - sourcetarget - destnet.openhft.chronicle.core.io.InvalidMarshallableException@NotNull public static <T> T project(Class<T> tClass, Object source) throws net.openhft.chronicle.core.io.InvalidMarshallableException
T - Type of the target classtClass - The target class type to project tosource - The source objectnet.openhft.chronicle.core.io.InvalidMarshallableException - if there's an error during the projection processpublic static boolean isEquals(@NotNull
@NotNull Object o1,
@NotNull
@NotNull Object o2)
o1 - First objecto2 - Second object@NotNull public static @NotNull List<FieldInfo> fieldInfos(@NotNull @NotNull Class<?> aClass)
aClass - Class to retrieve field information for@NotNull public static @NotNull Map<String,FieldInfo> fieldInfoMap(@NotNull @NotNull Class<?> aClass)
aClass - Class to retrieve field information forpublic static FieldInfo fieldInfo(@NotNull @NotNull Class<?> aClass, String name)
aClass - Class to which the field belongsname - Field namepublic static boolean isEndOfFile(int num)
true if the supplied header value denotes end of data.@Nullable
public static <T> T getField(@NotNull
@NotNull Object o,
String name,
Class<T> tClass)
throws NoSuchFieldException
T - Type parameter representing the desired typeo - Object to retrieve the field value fromname - Field nametClass - Desired type to convert the field value toNoSuchFieldException - if the field doesn't existpublic static long getLongField(@NotNull
@NotNull Object o,
String name)
throws NoSuchFieldException
o - Object to retrieve the field value fromname - Field nameNoSuchFieldException - if the specified field doesn't existpublic static void setField(@NotNull
@NotNull Object o,
String name,
Object value)
throws NoSuchFieldException
o - Object in which the field value will be setname - Field namevalue - New value to setNoSuchFieldException - if the specified field doesn't existpublic static void setLongField(@NotNull
@NotNull Object o,
String name,
long value)
throws NoSuchFieldException
o - Object in which the field value will be setname - Field namevalue - New long value to setNoSuchFieldException - if the specified field doesn't existpublic static void reset(@NotNull
@NotNull Object o)
o - Object to be resetpublic static int removeMaskedTidFromHeader(int header)
header - The header with a potentially masked thread ID@Nullable public static <E> E objectSequence(ValueIn in, @Nullable E using, @Nullable @Nullable Class<? extends E> clazz, SerializationStrategy strategy)
E - Type parameter of the object sequencein - ValueIn instance providing the input datausing - Optional object to read the data into (can be null)clazz - Class type of the object sequence, can be null for generic Objectstrategy - Serialization strategy to use for reading the sequence@Nullable public static <E> E objectMap(ValueIn in, @Nullable E using, @Nullable @Nullable Class<? extends E> clazz, @NotNull @NotNull SerializationStrategy strategy) throws net.openhft.chronicle.core.io.InvalidMarshallableException
E - Type parameter of the object mapin - ValueIn instance providing the input datausing - Optional object to read the data into (can be null)clazz - Class type of the object map, can be null for generic Objectstrategy - Serialization strategy to use for reading the mapnet.openhft.chronicle.core.io.InvalidMarshallableException - If the deserialization process encounters an error@NotNull public static <E> E objectDate(ValueIn in, @Nullable E using)
E - Expected type (often Date) to be returnedin - ValueIn instance providing the input datausing - Optional Date object to read the data into (can be null)@Nullable public static <E> E object0(ValueIn in, @Nullable E using, @Nullable @Nullable Class<? extends E> clazz) throws net.openhft.chronicle.core.io.InvalidMarshallableException
E - Type parameter of the objectin - ValueIn instance providing the input datausing - Optional object to read the data into (can be null)clazz - Class type of the object, can be null for generic Objectnet.openhft.chronicle.core.io.InvalidMarshallableException - If the deserialization process encounters an errorpublic static <E> E object0(ValueIn in, @Nullable E using, @Nullable @Nullable Class<? extends E> clazz, boolean bestEffort) throws net.openhft.chronicle.core.io.InvalidMarshallableException
E - The type of the object being deserialized.in - The input source to read the serialized data from.using - An optional object to populate with the deserialized data. Can be null.clazz - The expected class type of the deserialized object. Can be null.bestEffort - Flag to determine the effort in deserialization. If false, exceptions may be thrown for mismatches.net.openhft.chronicle.core.io.InvalidMarshallableException - If an error occurs during deserialization.public static <E> E object1(ValueIn in, @Nullable E using, @Nullable @Nullable Class<? extends E> clazz, boolean bestEffort) throws net.openhft.chronicle.core.io.InvalidMarshallableException
E - The type of the object being deserialized.in - The input source to read the serialized data from.using - An optional object to populate with the deserialized data. Can be null.clazz - The expected class type of the deserialized object. Can be null.bestEffort - Flag to determine the effort in deserialization. If false, exceptions may be thrown for mismatches.net.openhft.chronicle.core.io.InvalidMarshallableException - If an error occurs during deserialization.public static boolean dtoInterface(Class<?> clazz)
clazz - The class to check.public static String typeNameFor(@NotNull @NotNull Object value)
value - The object whose type name is to be fetched.public static String typeNameFor(net.openhft.chronicle.core.pool.ClassLookup classLookup, @NotNull @NotNull Object value)
classLookup - The class lookup mechanism to use.value - The object whose type name is to be fetched.@Nullable public static <T> T tupleFor(Class<T> tClass, String typeName)
T - The type parameter.tClass - The class type for which the tuple is required.typeName - The type name.public static boolean isInternal(@NotNull
@NotNull Object value)
value - The object to check.@NotNull public static @NotNull BinaryWire binaryWireForRead(net.openhft.chronicle.bytes.Bytes<?> in, long position, long length)
BinaryWire configured to read from the supplied
byte store. The returned wire shares the underlying bytes; no copy is made.@NotNull public static @NotNull BinaryWire binaryWireForWrite(net.openhft.chronicle.bytes.Bytes<?> in, long position, long length)
BinaryWire configured for writing to the supplied
byte store. The returned wire views the given bytes without copying.Copyright © 2026 Chronicle Software Ltd. All rights reserved.