public interface ValueIn
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ValueIn.Reader
Interface for reading values from the wire into a list.
|
| Modifier and Type | Field and Description |
|---|---|
static Consumer<ValueIn> |
DISCARD
A constant consumer that does nothing when accepting a
ValueIn. |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
applyToMarshallable(Function<WireIn,T> marshallableReader)
Applies a Function to this ValueIn, interpreting it as a WireIn for a marshallable object.
|
default int |
array(boolean[] array)
Reads an array of boolean values from the wire, populating the provided array.
|
default int |
array(byte[] array)
Reads an array of byte values from the wire, populating the provided array.
|
default int |
array(net.openhft.chronicle.bytes.Bytes[] array)
Reads an array of Bytes objects from the wire, populating the provided array.
|
default int |
array(double[] array)
Reads an array of double values from the wire, populating the provided array.
|
default int |
array(int[] array)
Reads an array of int values from the wire, populating the provided array.
|
default int |
array(long[] array)
Reads an array of long values from the wire, populating the provided array.
|
default int |
arrayDelta(double[] array)
Reads an array of double values with delta compression from the wire, populating the provided array.
|
default int |
arrayDelta(long[] array)
Reads an array of long values with delta compression from the wire, populating the provided array.
|
default <E extends Enum<E>> |
asEnum(Class<E> eClass)
Reads an Enum value of the specified type from the wire.
|
default <E extends Enum<E>> |
asEnum(Class<E> eClass,
@NotNull Consumer<E> eConsumer)
Reads an Enum value of the specified type from the wire and applies it to a Consumer.
|
default <E extends Enum<E>,T> |
asEnum(Class<E> eClass,
T t,
@NotNull BiConsumer<T,E> teConsumer)
Reads an Enum value of the specified type from the wire and applies it to a given object using a BiConsumer.
|
boolean |
bool()
Reads a boolean value from the wire.
|
WireIn |
bool(@NotNull net.openhft.chronicle.core.values.BooleanValue ret)
Reads a boolean value and populates the provided BooleanValue.
|
<T> @NotNull WireIn |
bool(T t,
@NotNull net.openhft.chronicle.core.util.ObjBooleanConsumer<T> tFlag)
Reads a boolean value and applies it to the provided consumer.
|
default void |
byteBuffer(@NotNull ByteBuffer bb)
Puts the byte data into the provided ByteBuffer.
|
default byte[] |
bytes()
Retrieves the byte data as an array.
|
byte[] |
bytes(byte[] using)
Retrieves the byte data as an array with the option to reuse an existing byte array.
|
@NotNull WireIn |
bytes(@NotNull net.openhft.chronicle.bytes.BytesOut<?> toBytes)
Reads byte data into the provided BytesOut object.
|
default WireIn |
bytes(@NotNull net.openhft.chronicle.bytes.BytesOut<?> toBytes,
boolean clearBytes)
Reads byte data into the provided BytesOut object with an option to clear the BytesOut before reading.
|
@NotNull WireIn |
bytes(@NotNull net.openhft.chronicle.bytes.ReadBytesMarshallable bytesMarshallable)
Reads byte data using the provided ReadBytesMarshallable.
|
default @Nullable net.openhft.chronicle.bytes.BytesStore<?,?> |
bytesLiteral()
Retrieves the byte data as a BytesStore object.
|
default @NotNull WireIn |
bytesLiteral(@NotNull net.openhft.chronicle.bytes.BytesOut<?> toBytes)
Reads byte data into the provided BytesOut object.
|
@NotNull WireIn |
bytesMatch(@NotNull net.openhft.chronicle.bytes.BytesStore<?,?> compareBytes,
net.openhft.chronicle.core.util.BooleanConsumer consumer)
Compares byte data with the provided BytesStore and uses the given BooleanConsumer based on the result.
|
@Nullable WireIn |
bytesSet(@NotNull net.openhft.chronicle.bytes.PointerBytesStore toBytes)
Sets byte data to the provided PointerBytesStore.
|
default @Nullable net.openhft.chronicle.bytes.BytesStore<?,?> |
bytesStore()
Retrieves the byte data as a BytesStore object.
|
default char |
character()
Reads text data and returns the first character.
|
net.openhft.chronicle.core.pool.ClassLookup |
classLookup()
Retrieves a
ClassLookup instance associated with the current WireIn. |
default <O,T extends ReadMarshallable> |
collection(O o,
Function<O,T> tSupplier)
Reads a sequence of
ReadMarshallable items into a collection, where each item is constructed using the provided Function. |
default <T,C extends Collection<T>> |
collection(@NotNull Supplier<C> supplier,
Class<T> t)
Reads a Collection of objects of a specified type from the wire, using the provided supplier for the Collection type.
|
default LocalDate |
date()
Reads a LocalDate directly from the wire.
|
<T> @NotNull WireIn |
date(T t,
@NotNull BiConsumer<T,LocalDate> tLocalDate)
Reads a LocalDate from the wire and applies it to a given object using the provided BiConsumer.
|
default LocalDateTime |
dateTime()
Reads a LocalDateTime directly from the wire.
|
float |
float32()
Reads a 32-bit floating point number from the wire.
|
default float |
float32(float previous)
Reads a 32-bit floating-point (float) value from the wire with a previous value as a reference.
|
<T> @NotNull WireIn |
float32(T t,
@NotNull net.openhft.chronicle.core.util.ObjFloatConsumer<T> tf)
Reads a 32-bit floating-point (float) value and applies an ObjFloatConsumer with the provided object and the read value.
|
double |
float64()
Reads a 64-bit floating point number from the wire.
|
default double |
float64(double previous)
Reads a 64-bit floating-point (double) value from the wire with a previous value as a reference.
|
<T> @NotNull WireIn |
float64(T t,
@NotNull ObjDoubleConsumer<T> td)
Reads a 64-bit floating-point (double) value and applies an ObjDoubleConsumer with the provided object and the read value.
|
@NotNull BracketType |
getBracketType()
Gets the bracket type for the current value in the wire.
|
boolean |
hasNext()
Checks if there is another element to read in a sequence or collection.
|
boolean |
hasNextSequenceItem()
Checks if there is another item in a sequence.
|
default @NotNull WireIn |
int128(@NotNull net.openhft.chronicle.core.values.TwoLongValue value)
Reads a 128-bit integer value from the wire into the specified TwoLongValue.
|
short |
int16()
Reads a 16-bit integer (short) value from the wire.
|
<T> @NotNull WireIn |
int16(T t,
@NotNull net.openhft.chronicle.core.util.ObjShortConsumer<T> ti)
Reads a 16-bit integer (short) value and applies an ObjShortConsumer with the provided object and the read value.
|
int |
int32()
Reads a 32-bit integer (int) value from the wire.
|
default int |
int32(int previous)
Reads a 32-bit integer (int) value from the wire with a previous value as a reference.
|
@NotNull WireIn |
int32(@NotNull net.openhft.chronicle.core.values.IntValue value)
Reads a 32-bit integer value from the wire into the specified IntValue.
|
<T> @NotNull WireIn |
int32(@Nullable net.openhft.chronicle.core.values.IntValue value,
T t,
@NotNull BiConsumer<T,net.openhft.chronicle.core.values.IntValue> setter)
Reads a 32-bit signed integer, populates the IntValue, and applies the IntValue using the provided consumer.
|
<T> @NotNull WireIn |
int32(T t,
@NotNull ObjIntConsumer<T> ti)
Reads a 32-bit integer (int) value and applies an ObjIntConsumer with the provided object and the read value.
|
long |
int64()
Reads a 64-bit integer (long) value from the wire.
|
default long |
int64(long previous)
Reads a 64-bit integer (long) value from the wire with a previous value as a reference.
|
@NotNull WireIn |
int64(@NotNull net.openhft.chronicle.core.values.LongValue value)
Reads a 64-bit integer value from the wire into the specified LongValue.
|
<T> @NotNull WireIn |
int64(@Nullable net.openhft.chronicle.core.values.LongValue value,
T t,
@NotNull BiConsumer<T,net.openhft.chronicle.core.values.LongValue> setter)
Reads a 64-bit signed integer, populates the LongValue, and applies the LongValue using the provided consumer.
|
<T> @NotNull WireIn |
int64(T t,
@NotNull ObjLongConsumer<T> tl)
Reads a 64-bit integer (long) value and applies an ObjLongConsumer with the provided object and the read value.
|
<T> @NotNull WireIn |
int64array(@Nullable net.openhft.chronicle.core.values.LongArrayValues values,
T t,
@NotNull BiConsumer<T,net.openhft.chronicle.core.values.LongArrayValues> setter)
Reads a LongArrayValues from the wire and applies it to a given object using the provided BiConsumer.
|
default @NotNull net.openhft.chronicle.core.values.LongValue |
int64ForBinding(@Nullable net.openhft.chronicle.core.values.LongValue value)
Reads a 64-bit integer for binding.
|
byte |
int8()
Reads an 8-bit integer (byte) value from the wire.
|
<T> @NotNull WireIn |
int8(T t,
@NotNull net.openhft.chronicle.core.util.ObjByteConsumer<T> tb)
Reads an 8-bit integer (byte) value and applies an ObjByteConsumer with the provided object and the read value.
|
default boolean |
isBinary()
Checks if the current value in the wire is binary.
|
boolean |
isNull()
Checks if the current value in the wire is null.
|
default boolean |
isPresent()
Checks if a value is present in the data stream.
|
boolean |
isTyped()
Checks if the current value in the wire is typed.
|
default @Nullable Type |
lenientTypeLiteral()
Reads a type literal from the wire, returning it as a Type object, with a fallback for unresolved types.
|
default <T> List<T> |
list(Class<T> t)
Reads a List of objects of a specified type from the wire.
|
default <O,T extends ReadMarshallable> |
list(O o,
Function<O,T> tSupplier)
Reads a List of ReadMarshallable objects from the wire, and applies them to a provided object using the function.
|
@Nullable Object |
marshallable(@NotNull Object object,
@NotNull SerializationStrategy strategy)
Reads a marshallable object from the wire and applies a specified SerializationStrategy.
|
default boolean |
marshallable(@NotNull ReadMarshallable object)
Reads a ReadMarshallable object from the wire.
|
default boolean |
marshallable(@NotNull Serializable object)
Reads a Serializable object from the wire.
|
default <K,V> @Nullable Map<K,V> |
marshallableAsMap(Class<K> kClass,
@NotNull Class<V> vClass)
Reads a Map of marshallable key-value pairs as specified by the provided classes.
|
default <K,V> @Nullable Map<K,V> |
marshallableAsMap(Class<K> kClass,
@NotNull Class<V> vClass,
@NotNull Map<K,V> map)
Reads a Map of marshallable key-value pairs into the provided Map.
|
default @Nullable Object |
object() |
default <E> E |
object(@Nullable Class<E> clazz)
Reads an object of the specified class from the wire.
|
default <T,E> @Nullable WireIn |
object(@NotNull Class<E> clazz,
T t,
@NotNull BiConsumer<T,E> e)
Reads an object of a specified class from the wire and applies it to a given object using a BiConsumer.
|
default <E> E |
object(E using,
@Nullable Class<? extends E> clazz)
Reads an object from the wire.
|
default <E> E |
object(E using,
@Nullable Class<? extends E> clazz,
boolean bestEffort)
Reads an object from the wire.
|
default Object |
objectBestEffort()
Deserializes an object from the current data stream, attempting to return any object that can be parsed.
|
@Nullable Object |
objectWithInferredType(Object using,
SerializationStrategy strategy,
Class<?> type)
Reads an object from the wire with an inferred type.
|
default boolean |
readBoolean()
Reads a boolean value from the wire.
|
default byte |
readByte()
Reads a byte value from the wire.
|
default char |
readChar()
Reads a char value from the wire.
|
default double |
readDouble()
Reads a double value from the wire.
|
default <T> void |
reader0(ValueIn v,
List<T> list,
List<T> buffer,
Supplier<T> bufferAdd)
Helper method to read a sequence of values into a list using a buffer.
|
default float |
readFloat()
Reads a float value from the wire.
|
default int |
readInt()
Reads an int value from the wire.
|
long |
readLength()
Retrieves the length of the field in bytes, inclusive of any encoding and header character.
|
default long |
readLong()
Reads a long value from the wire.
|
default long |
readLong(LongConverter longConverter)
Reads a long value from the wire using a LongConverter.
|
default short |
readShort()
Reads a short value from the wire.
|
default String |
readString()
Reads a String from the wire.
|
void |
resetState()
Resets the internal state of this ValueIn.
|
default <T> boolean |
sequence(@NotNull List<T> list,
@NotNull List<T> buffer,
@NotNull Supplier<T> bufferAdd)
sequence to use when using a cached buffer
|
<T> boolean |
sequence(List<T> list,
@NotNull List<T> buffer,
Supplier<T> bufferAdd,
ValueIn.Reader reader0)
Processes a sequence of values from the wire, storing them in a list.
|
<T> boolean |
sequence(T t,
@NotNull BiConsumer<T,ValueIn> tReader)
Reads a sequence of values using the provided consumer.
|
<T,K> @NotNull WireIn |
sequence(T t,
K k,
@NotNull TriConsumer<T,K,ValueIn> tReader)
Processes a sequence of values from the wire, applying a TriConsumer to each item in the sequence.
|
default <T> boolean |
sequence(T t,
@NotNull SerializationStrategy tReader)
Processes a sequence of values from the wire using a SerializationStrategy.
|
default <T> int |
sequenceWithLength(T t,
@NotNull ToIntBiFunction<ValueIn,T> tReader)
Reads a sequence of values and applies a function that returns the length of the sequence.
|
default <T> Set<T> |
set(Class<T> t)
Reads a Set of objects of a specified type from the wire.
|
default <O,T extends ReadMarshallable> |
set(O o,
Function<O,T> tSupplier)
Reads a Set of ReadMarshallable objects from the wire, and applies them to a provided object using the function.
|
@NotNull WireIn |
skipValue()
Skips the current value while reading.
|
@Nullable String |
text()
Reads and returns the text data.
|
default @NotNull WireIn |
text(@NotNull net.openhft.chronicle.bytes.Bytes<?> sdo)
Reads text data into the provided Bytes object, which is then cleared.
|
default @NotNull WireIn |
text(@NotNull StringBuilder sb)
Reads text data and appends it to the given StringBuilder.
|
default <T> @NotNull WireIn |
text(T t,
@NotNull BiConsumer<T,String> ts)
Reads text data and applies a given bi-consumer to the text data and the provided object.
|
@Nullable net.openhft.chronicle.bytes.Bytes<?> |
textTo(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes)
Reads text data into the provided Bytes object.
|
@Nullable StringBuilder |
textTo(@NotNull StringBuilder sb)
Reads text data and appends it to the given StringBuilder.
|
default Throwable |
throwable(boolean appendCurrentStack)
Reads a Throwable from the wire, optionally appending the current stack trace.
|
default LocalTime |
time()
Reads a LocalTime directly from the wire.
|
<T> @NotNull WireIn |
time(T t,
@NotNull BiConsumer<T,LocalTime> setLocalTime) |
<T> T |
typedMarshallable()
Reads a typed marshallable object from the wire.
|
default <T> T |
typedMarshallable(@NotNull Function<Class<T>,ReadMarshallable> marshallableFunction)
Reads a typed marshallable object from the wire, using the provided function to create instances.
|
default <T> @Nullable Class<T> |
typeLiteral()
Reads a Class type literal from the wire.
|
Type |
typeLiteral(BiFunction<CharSequence,ClassNotFoundException,Type> unresolvedHandler)
Reads a type literal from the wire, applying a handler for unresolved types.
|
default <T> @NotNull WireIn |
typeLiteral(T t,
@NotNull BiConsumer<T,Class> classConsumer)
Reads a type literal as text and applies it to a given object using the provided BiConsumer.
|
default <T> @NotNull WireIn |
typeLiteral(T t,
@NotNull BiConsumer<T,Class> classConsumer,
Class<?> defaultClass)
Reads a type literal from the wire, applies it to a given object using the provided BiConsumer, and uses a default Class if necessary.
|
<T> @NotNull WireIn |
typeLiteralAsText(T t,
@NotNull BiConsumer<T,CharSequence> classNameConsumer)
Consumes a type literal (a class name) as text from the wire, passing it to a consumer.
|
@Nullable Class<?> |
typePrefix()
Reads the type prefix from the wire.
|
<T> @NotNull ValueIn |
typePrefix(T t,
@NotNull BiConsumer<T,CharSequence> ts)
Reads a type prefix and applies it to a given object using the provided BiConsumer.
|
default @Nullable Object |
typePrefixOrObject(Class<?> tClass)
read a class with a super class or actual class as a hint
|
int |
uint16()
Reads an unsigned 16-bit integer (represented as an int) from the wire.
|
<T> @NotNull WireIn |
uint16(T t,
@NotNull ObjIntConsumer<T> ti)
Reads an unsigned 16-bit integer (int) value and applies an ObjIntConsumer with the provided object and the read value.
|
<T> @NotNull WireIn |
uint32(T t,
@NotNull ObjLongConsumer<T> tl)
Reads an unsigned 32-bit integer (long) value and applies an ObjLongConsumer with the provided object and the read value.
|
<T> @NotNull WireIn |
uint8(T t,
@NotNull net.openhft.chronicle.core.util.ObjShortConsumer<T> ti)
Reads an unsigned 8-bit integer (short) value and applies an ObjShortConsumer with the provided object and the read value.
|
default @NotNull UUID |
uuid()
Reads a UUID from the wire.
|
<T> @NotNull WireIn |
uuid(T t,
@NotNull BiConsumer<T,UUID> tuuid)
Reads a UUID from the wire and applies it to a given object using the provided BiConsumer.
|
@NotNull WireIn |
wireIn()
Provides the current WireIn instance.
|
default ZonedDateTime |
zonedDateTime()
Reads a ZonedDateTime directly from the wire.
|
<T> @NotNull WireIn |
zonedDateTime(T t,
@NotNull BiConsumer<T,ZonedDateTime> tZonedDateTime)
Reads a ZonedDateTime from the wire and applies it to a given object using the provided BiConsumer.
|
@NotNull default <T> @NotNull WireIn text(T t, @NotNull @NotNull BiConsumer<T,String> ts)
T - Type of the target object.t - The target object.ts - The bi-consumer that accepts the target object and the read text.@NotNull default @NotNull WireIn text(@NotNull @NotNull StringBuilder sb)
sb - The StringBuilder to append the text data to.default char character()
@NotNull default @NotNull WireIn text(@NotNull @NotNull net.openhft.chronicle.bytes.Bytes<?> sdo)
sdo - The Bytes object to store the text data.@Nullable @Nullable String text()
@Nullable @Nullable StringBuilder textTo(@NotNull @NotNull StringBuilder sb)
sb - The StringBuilder to append the text data to.@Nullable
@Nullable net.openhft.chronicle.bytes.Bytes<?> textTo(@NotNull
@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes)
bytes - The Bytes object to store the text data.@NotNull @NotNull WireIn bytes(@NotNull @NotNull net.openhft.chronicle.bytes.BytesOut<?> toBytes)
toBytes - The BytesOut object to store the byte data.default WireIn bytes(@NotNull @NotNull net.openhft.chronicle.bytes.BytesOut<?> toBytes, boolean clearBytes)
toBytes - The BytesOut object to store the byte data.clearBytes - If true, the BytesOut object will be cleared before reading.@NotNull default @NotNull WireIn bytesLiteral(@NotNull @NotNull net.openhft.chronicle.bytes.BytesOut<?> toBytes)
bytes(BytesOut) method.toBytes - The BytesOut object to store the byte data.@Nullable default @Nullable net.openhft.chronicle.bytes.BytesStore<?,?> bytesLiteral()
bytesStore() method.@Nullable @Nullable WireIn bytesSet(@NotNull @NotNull net.openhft.chronicle.bytes.PointerBytesStore toBytes)
toBytes - The PointerBytesStore to set the byte data.@NotNull @NotNull WireIn bytesMatch(@NotNull @NotNull net.openhft.chronicle.bytes.BytesStore<?,?> compareBytes, net.openhft.chronicle.core.util.BooleanConsumer consumer)
compareBytes - The BytesStore to compare with.consumer - The BooleanConsumer to be called based on the comparison result.@NotNull @NotNull WireIn bytes(@NotNull @NotNull net.openhft.chronicle.bytes.ReadBytesMarshallable bytesMarshallable)
bytesMarshallable - The ReadBytesMarshallable to read the byte data.default byte[] bytes()
byte[] bytes(byte[] using)
using - The existing byte array to use or null.@Nullable default @Nullable net.openhft.chronicle.bytes.BytesStore<?,?> bytesStore()
default void byteBuffer(@NotNull
@NotNull ByteBuffer bb)
bb - The ByteBuffer to put the byte data.@NotNull @NotNull WireIn wireIn()
long readLength()
@NotNull @NotNull WireIn skipValue()
@NotNull <T> @NotNull WireIn bool(T t, @NotNull @NotNull net.openhft.chronicle.core.util.ObjBooleanConsumer<T> tFlag)
T - The type of the target object.t - The target object.tFlag - The consumer that accepts the target object and the read boolean value.@NotNull <T> @NotNull WireIn int8(@NotNull T t, @NotNull @NotNull net.openhft.chronicle.core.util.ObjByteConsumer<T> tb)
T - The type of object to be passed to the ObjByteConsumer.t - The object to be passed to the ObjByteConsumer.tb - The ObjByteConsumer that accepts the object and the read 8-bit integer value.@NotNull <T> @NotNull WireIn uint8(@NotNull T t, @NotNull @NotNull net.openhft.chronicle.core.util.ObjShortConsumer<T> ti)
T - The type of object to be passed to the ObjShortConsumer.t - The object to be passed to the ObjShortConsumer.ti - The ObjShortConsumer that accepts the object and the read unsigned 8-bit integer value.@NotNull <T> @NotNull WireIn int16(@NotNull T t, @NotNull @NotNull net.openhft.chronicle.core.util.ObjShortConsumer<T> ti)
T - The type of object to be passed to the ObjShortConsumer.t - The object to be passed to the ObjShortConsumer.ti - The ObjShortConsumer that accepts the object and the read 16-bit integer value.@NotNull <T> @NotNull WireIn uint16(@NotNull T t, @NotNull @NotNull ObjIntConsumer<T> ti)
T - The type of object to be passed to the ObjIntConsumer.t - The object to be passed to the ObjIntConsumer.ti - The ObjIntConsumer that accepts the object and the read unsigned 16-bit integer value.@NotNull <T> @NotNull WireIn int32(@NotNull T t, @NotNull @NotNull ObjIntConsumer<T> ti)
T - The type of object to be passed to the ObjIntConsumer.t - The object to be passed to the ObjIntConsumer.ti - The ObjIntConsumer that accepts the object and the read 32-bit integer value.@NotNull <T> @NotNull WireIn uint32(@NotNull T t, @NotNull @NotNull ObjLongConsumer<T> tl)
T - The type of object to be passed to the ObjLongConsumer.t - The object to be passed to the ObjLongConsumer.tl - The ObjLongConsumer that accepts the object and the read unsigned 32-bit integer value.@NotNull <T> @NotNull WireIn int64(@NotNull T t, @NotNull @NotNull ObjLongConsumer<T> tl)
T - The type of object to be passed to the ObjLongConsumer.t - The object to be passed to the ObjLongConsumer.tl - The ObjLongConsumer that accepts the object and the read 64-bit integer value.@NotNull <T> @NotNull WireIn float32(@NotNull T t, @NotNull @NotNull net.openhft.chronicle.core.util.ObjFloatConsumer<T> tf)
T - The type of object to be passed to the ObjFloatConsumer.t - The object to be passed to the ObjFloatConsumer.tf - The ObjFloatConsumer that accepts the object and the read 32-bit floating-point value.@NotNull <T> @NotNull WireIn float64(@NotNull T t, @NotNull @NotNull ObjDoubleConsumer<T> td)
T - The type of object to be passed to the ObjDoubleConsumer.t - The object to be passed to the ObjDoubleConsumer.td - The ObjDoubleConsumer that accepts the object and the read 64-bit floating-point value.@NotNull <T> @NotNull WireIn time(@NotNull T t, @NotNull @NotNull BiConsumer<T,LocalTime> setLocalTime)
@NotNull <T> @NotNull WireIn zonedDateTime(@NotNull T t, @NotNull @NotNull BiConsumer<T,ZonedDateTime> tZonedDateTime)
T - The type of object to be passed to the BiConsumer.t - The object to be passed to the BiConsumer.tZonedDateTime - The BiConsumer that accepts the object and the read ZonedDateTime.@NotNull <T> @NotNull WireIn date(@NotNull T t, @NotNull @NotNull BiConsumer<T,LocalDate> tLocalDate)
T - The type of object to be passed to the BiConsumer.t - The object to be passed to the BiConsumer.tLocalDate - The BiConsumer that accepts the object and the read LocalDate.default LocalDate date()
default LocalTime time()
default LocalDateTime dateTime()
default ZonedDateTime zonedDateTime()
boolean hasNext()
boolean hasNextSequenceItem()
@NotNull <T> @NotNull WireIn uuid(@NotNull T t, @NotNull @NotNull BiConsumer<T,UUID> tuuid)
T - The type of object to be passed to the BiConsumer.t - The object to be passed to the BiConsumer.tuuid - The BiConsumer that accepts the object and the read UUID.@NotNull <T> @NotNull WireIn int64array(@Nullable @Nullable net.openhft.chronicle.core.values.LongArrayValues values, T t, @NotNull @NotNull BiConsumer<T,net.openhft.chronicle.core.values.LongArrayValues> setter)
T - The type of object to be passed to the BiConsumer.values - The LongArrayValues to read the data into.t - The object to be passed to the BiConsumer.setter - The BiConsumer that accepts the object and the LongArrayValues.@NotNull default @NotNull WireIn int128(@NotNull @NotNull net.openhft.chronicle.core.values.TwoLongValue value)
value - The TwoLongValue to read the 128-bit integer into.@NotNull @NotNull WireIn int64(@NotNull @NotNull net.openhft.chronicle.core.values.LongValue value)
value - The LongValue to read the 64-bit integer into.@NotNull @NotNull WireIn int32(@NotNull @NotNull net.openhft.chronicle.core.values.IntValue value)
value - The IntValue to read the 32-bit integer into.@NotNull
default @NotNull net.openhft.chronicle.core.values.LongValue int64ForBinding(@Nullable
@Nullable net.openhft.chronicle.core.values.LongValue value)
value - The LongValue to be populated or null.WireIn bool(@NotNull @NotNull net.openhft.chronicle.core.values.BooleanValue ret)
ret - The BooleanValue to be populated.@NotNull <T> @NotNull WireIn int64(@Nullable @Nullable net.openhft.chronicle.core.values.LongValue value, T t, @NotNull @NotNull BiConsumer<T,net.openhft.chronicle.core.values.LongValue> setter)
T - The type of the target object.value - The LongValue to be populated.t - The target object.setter - The consumer that accepts the target object and the populated LongValue.@NotNull <T> @NotNull WireIn int32(@Nullable @Nullable net.openhft.chronicle.core.values.IntValue value, T t, @NotNull @NotNull BiConsumer<T,net.openhft.chronicle.core.values.IntValue> setter)
T - The type of the target object.value - The IntValue to be populated.t - The target object.setter - The consumer that accepts the target object and the populated IntValue.<T> boolean sequence(@NotNull
T t,
@NotNull
@NotNull BiConsumer<T,ValueIn> tReader)
T - The type of the target object.t - The target object.tReader - The consumer that reads the sequence into the target object.<T> boolean sequence(List<T> list, @NotNull @NotNull List<T> buffer, Supplier<T> bufferAdd, ValueIn.Reader reader0) throws net.openhft.chronicle.core.io.InvalidMarshallableException
list - The list to store the processed items.buffer - The buffer for reusing objects.bufferAdd - Supplier to provide new instances for the buffer.reader0 - The reader that processes each item in the sequence.net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault <T> boolean sequence(@NotNull
T t,
@NotNull
@NotNull SerializationStrategy tReader)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
T - The type of the object to be processed.t - The object to be processed.tReader - The SerializationStrategy to process the object.net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault <T> void reader0(ValueIn v, List<T> list, List<T> buffer, Supplier<T> bufferAdd) throws net.openhft.chronicle.core.io.InvalidMarshallableException
v - The ValueIn to read from.list - The list to store the read values.buffer - The buffer for reusing objects.bufferAdd - Supplier to provide new instances for the buffer.net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault <T> boolean sequence(@NotNull
@NotNull List<T> list,
@NotNull
@NotNull List<T> buffer,
@NotNull
@NotNull Supplier<T> bufferAdd)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
list - of items to populatebuffer - of objects of the same type to reusebufferAdd - supplier to call when the buffer needs extendingnet.openhft.chronicle.core.io.InvalidMarshallableException@NotNull <T,K> @NotNull WireIn sequence(@NotNull T t, K k, @NotNull @NotNull TriConsumer<T,K,ValueIn> tReader) throws net.openhft.chronicle.core.io.InvalidMarshallableException
T - The type of the first object to be passed to the TriConsumer.K - The type of the second object to be passed to the TriConsumer.t - The first object to be passed to the TriConsumer.k - The second object to be passed to the TriConsumer.tReader - The TriConsumer that processes each item in the sequence.net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault <T> int sequenceWithLength(@NotNull
T t,
@NotNull
@NotNull ToIntBiFunction<ValueIn,T> tReader)
T - The type of the target object.t - The target object.tReader - A function that accepts a ValueIn reader and the target object and returns the length.default int array(net.openhft.chronicle.bytes.Bytes[] array)
array - The array of Bytes objects to be populated.default int array(double[] array)
array - The array of double values to be populated.default int arrayDelta(double[] array)
array - The array of double values to be populated.default int array(boolean[] array)
array - The array of boolean values to be populated.default int array(long[] array)
array - The array of long values to be populated.default int arrayDelta(long[] array)
array - The array of long values to be populated.default int array(int[] array)
array - The array of int values to be populated.default int array(byte[] array)
array - The array of byte values to be populated.default <T> Set<T> set(Class<T> t) throws net.openhft.chronicle.core.io.InvalidMarshallableException
T - The type of objects in the Set.t - The Class object representing the type T.net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault <T> List<T> list(Class<T> t) throws net.openhft.chronicle.core.io.InvalidMarshallableException
T - The type of objects in the List.t - The Class object representing the type T.net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault <T,C extends Collection<T>> C collection(@NotNull @NotNull Supplier<C> supplier, Class<T> t) throws net.openhft.chronicle.core.io.InvalidMarshallableException
T - The type of objects in the Collection.C - The type of the Collection.supplier - A Supplier providing instances of the Collection type C.t - The Class object representing the type T.net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default <O,T extends ReadMarshallable> @NotNull WireIn set(@NotNull O o, Function<O,T> tSupplier) throws net.openhft.chronicle.core.io.InvalidMarshallableException
O - The type of the object to apply the Set to.T - The type of the ReadMarshallable objects.o - The object to apply the Set to.tSupplier - A Function providing instances of type T.net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default <O,T extends ReadMarshallable> @NotNull WireIn list(@NotNull O o, Function<O,T> tSupplier) throws net.openhft.chronicle.core.io.InvalidMarshallableException
O - The type of the object to apply the List to.T - The type of the ReadMarshallable objects.o - The object to apply the List to.tSupplier - A Function providing instances of type T.net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default <O,T extends ReadMarshallable> @NotNull WireIn collection(@NotNull O o, Function<O,T> tSupplier) throws net.openhft.chronicle.core.io.InvalidMarshallableException
ReadMarshallable items into a collection, where each item is constructed using the provided Function.O - The type of the provided object.T - The type of the ReadMarshallable.o - An object passed to the function to create instances of ReadMarshallable.tSupplier - A function that, given the object 'o', returns an instance of ReadMarshallable.WireIn instance for chaining.net.openhft.chronicle.core.io.InvalidMarshallableException - If there's a serialization issue.@Nullable default <K,V> @Nullable Map<K,V> marshallableAsMap(Class<K> kClass, @NotNull @NotNull Class<V> vClass) throws net.openhft.chronicle.core.io.InvalidMarshallableException
K - The type of keys in the Map.V - The type of values in the Map.kClass - The class of the keys.vClass - The class of the values.net.openhft.chronicle.core.io.InvalidMarshallableException - if the key or value types are invalid@Nullable default <K,V> @Nullable Map<K,V> marshallableAsMap(Class<K> kClass, @NotNull @NotNull Class<V> vClass, @NotNull @NotNull Map<K,V> map)
K - The type of keys in the Map.V - The type of values in the Map.kClass - The class of the keys.vClass - The class of the values.map - The Map to populate with the read key-value pairs.@Nullable <T> T applyToMarshallable(Function<WireIn,T> marshallableReader)
T - The type of the result from the Function.marshallableReader - The Function to apply to this ValueIn.@Nullable
<T> T typedMarshallable()
throws net.openhft.chronicle.core.io.IORuntimeException,
net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.IORuntimeException - if an I/O error occursnet.openhft.chronicle.core.io.InvalidMarshallableException - if the marshallable object is invalid@Nullable
default <T> T typedMarshallable(@NotNull
@NotNull Function<Class<T>,ReadMarshallable> marshallableFunction)
throws net.openhft.chronicle.core.io.IORuntimeException,
net.openhft.chronicle.core.io.InvalidMarshallableException
marshallableFunction - The function to create marshallable object instances.net.openhft.chronicle.core.io.IORuntimeException - if an I/O error occursnet.openhft.chronicle.core.io.InvalidMarshallableException - if the marshallable object is invalid@NotNull <T> @NotNull ValueIn typePrefix(T t, @NotNull @NotNull BiConsumer<T,CharSequence> ts)
T - The type of the object to apply the type prefix to.t - The object to apply the type prefix to.ts - The BiConsumer that accepts the object and the type prefix.@NotNull <T> @NotNull WireIn typeLiteralAsText(T t, @NotNull @NotNull BiConsumer<T,CharSequence> classNameConsumer) throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException
T - The type of the provided object.t - The object to which the type literal relates.classNameConsumer - A consumer that accepts the provided object and the read class name.WireIn instance for chaining.net.openhft.chronicle.core.io.IORuntimeException - If there's an IO issue during reading.BufferUnderflowException - If there's not enough data in the buffer.net.openhft.chronicle.core.pool.ClassLookup classLookup()
ClassLookup instance associated with the current WireIn.
The ClassLookup allows for the resolution of class names to actual Class objects.@NotNull default <T> @NotNull WireIn typeLiteral(T t, @NotNull @NotNull BiConsumer<T,Class> classConsumer) throws net.openhft.chronicle.core.io.IORuntimeException
T - The type of the object to apply the type literal to.t - The object to apply the type literal to.classConsumer - The BiConsumer that accepts the object and the type literal.net.openhft.chronicle.core.io.IORuntimeException - if an I/O error occursBufferUnderflowException - if the buffer underflows while reading@NotNull default <T> @NotNull WireIn typeLiteral(T t, @NotNull @NotNull BiConsumer<T,Class> classConsumer, Class<?> defaultClass)
T - The type of the object to apply the type literal to.t - The object to apply the type literal to.classConsumer - The BiConsumer that accepts the object and the Class derived from the type literal.defaultClass - The default Class to use if the type literal cannot be resolved.@Nullable @Nullable Object marshallable(@NotNull @NotNull Object object, @NotNull @NotNull SerializationStrategy strategy) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException, net.openhft.chronicle.core.io.InvalidMarshallableException
object - The object to populate with the marshallable data.strategy - The SerializationStrategy to use for reading the marshallable data.BufferUnderflowException - if the buffer underflows while readingnet.openhft.chronicle.core.io.IORuntimeException - if an I/O error occursnet.openhft.chronicle.core.io.InvalidMarshallableException - if the marshallable object is invaliddefault boolean marshallable(@NotNull
@NotNull Serializable object)
throws BufferUnderflowException,
net.openhft.chronicle.core.io.IORuntimeException,
net.openhft.chronicle.core.io.InvalidMarshallableException
object - The Serializable object to populate with the data.BufferUnderflowException - if the buffer underflows while readingnet.openhft.chronicle.core.io.IORuntimeException - if an I/O error occursnet.openhft.chronicle.core.io.InvalidMarshallableException - if the Serializable object is invaliddefault boolean marshallable(@NotNull
@NotNull ReadMarshallable object)
throws BufferUnderflowException,
net.openhft.chronicle.core.io.IORuntimeException,
net.openhft.chronicle.core.io.InvalidMarshallableException
object - The ReadMarshallable object to populate with the data.BufferUnderflowException - if the buffer underflows while readingnet.openhft.chronicle.core.io.IORuntimeException - if an I/O error occursnet.openhft.chronicle.core.io.InvalidMarshallableException - if the ReadMarshallable object is invalidboolean bool()
byte int8()
short int16()
int uint16()
int int32()
default int int32(int previous)
previous - The previous 32-bit integer value.long int64()
default long int64(long previous)
previous - The previous 64-bit integer value.float float32()
default float float32(float previous)
previous - The previous 32-bit floating-point value.double float64()
default double float64(double previous)
previous - The previous 64-bit floating-point value.@Nullable default <T> @Nullable Class<T> typeLiteral() throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException - if an I/O error occursBufferUnderflowException - if the buffer underflows while reading@Nullable default @Nullable Type lenientTypeLiteral() throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException - if an I/O error occursBufferUnderflowException - if the buffer underflows while readingType typeLiteral(BiFunction<CharSequence,ClassNotFoundException,Type> unresolvedHandler)
unresolvedHandler - The handler to apply for unresolved types.default Throwable throwable(boolean appendCurrentStack) throws net.openhft.chronicle.core.io.InvalidMarshallableException
appendCurrentStack - True to append the current stack trace to the Throwable.net.openhft.chronicle.core.io.InvalidMarshallableException - if the Throwable object is invalid@Nullable default <E extends Enum<E>> E asEnum(Class<E> eClass)
eClass - The class of the Enum type.@NotNull default <E extends Enum<E>> @NotNull WireIn asEnum(Class<E> eClass, @NotNull @NotNull Consumer<E> eConsumer)
eClass - The class of the Enum type.eConsumer - The Consumer to apply the Enum value to.@NotNull default <E extends Enum<E>,T> @NotNull WireIn asEnum(Class<E> eClass, T t, @NotNull @NotNull BiConsumer<T,E> teConsumer)
eClass - The class of the Enum type.t - The object to apply the Enum value to.teConsumer - The BiConsumer that accepts the object and the Enum value.@Nullable
default <E> E object(@Nullable
@Nullable Class<E> clazz)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
clazz - The class of the object to read.net.openhft.chronicle.core.io.InvalidMarshallableException - if the object is invalid@Nullable default @Nullable Object object() throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault Object objectBestEffort()
This method is used for logging purposes and aims to be lenient, capturing and returning exceptions as results if they occur during the deserialization process.
Throwable if an error occurs during deserialization.@Nullable
default <E> E object(@Nullable
E using,
@Nullable
@Nullable Class<? extends E> clazz)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
E - The type of the object to read.using - An instance of the object to reuse, or null to create a new instance.clazz - The class of the object to read.net.openhft.chronicle.core.io.InvalidMarshallableException - if the object is invaliddefault <E> E object(@Nullable
E using,
@Nullable
@Nullable Class<? extends E> clazz,
boolean bestEffort)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
E - The type of the object to read.using - An instance of the object to reuse, or null to create a new instance.clazz - The class of the object to read.bestEffort - Set to true for best effort reading, which may not throw exceptions for some errors.net.openhft.chronicle.core.io.InvalidMarshallableException - if the object is invalid@NotNull @NotNull BracketType getBracketType()
boolean isNull()
@Nullable default <T,E> @Nullable WireIn object(@NotNull @NotNull Class<E> clazz, T t, @NotNull @NotNull BiConsumer<T,E> e) throws net.openhft.chronicle.core.io.InvalidMarshallableException
T - The type of the object to apply the read value to.E - The type of the object being read.clazz - The class of the object being read.t - The object to apply the read value to.e - The BiConsumer that accepts the object and the read value.net.openhft.chronicle.core.io.InvalidMarshallableException - if the object is invalidboolean isTyped()
@Nullable @Nullable Class<?> typePrefix()
@Nullable default @Nullable Object typePrefixOrObject(Class<?> tClass) throws net.openhft.chronicle.core.util.ClassNotFoundRuntimeException
tClass - the super-class, or actual class to usenet.openhft.chronicle.core.util.ClassNotFoundRuntimeException - if the specific class couldn't be found.void resetState()
@Nullable @Nullable Object objectWithInferredType(Object using, SerializationStrategy strategy, Class<?> type) throws net.openhft.chronicle.core.io.InvalidMarshallableException
using - An instance of the object to reuse, or null to create a new instance.strategy - The SerializationStrategy to use for reading the object.type - The type of the object to read.net.openhft.chronicle.core.io.InvalidMarshallableException - if the object is invaliddefault boolean isPresent()
@NotNull default @NotNull UUID uuid()
default boolean isBinary()
default long readLong(LongConverter longConverter)
longConverter - The LongConverter to use for reading the long value.default boolean readBoolean()
default byte readByte()
default char readChar()
default short readShort()
default int readInt()
default long readLong()
default float readFloat()
default double readDouble()
default String readString()
Copyright © 2024. All rights reserved.