ValueIn.Reader| 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.
|
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.
|
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.
|
@NotNull WireIn |
bytes(@NotNull net.openhft.chronicle.bytes.ReadBytesMarshallable wireInConsumer)
Reads byte data using the provided ReadBytesMarshallable.
|
@NotNull WireIn |
bytesMatch(@NotNull net.openhft.chronicle.bytes.BytesStore<?,?> compareBytes,
@NotNull 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.
|
net.openhft.chronicle.core.pool.ClassLookup |
classLookup()
Retrieves a
ClassLookup instance associated with the current WireIn. |
<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.
|
float |
float32()
Reads a 32-bit floating point number from the wire.
|
<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.
|
<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.
|
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.
|
@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.
|
@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.
|
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.
|
boolean |
isNull()
Checks if the current value in the wire is null.
|
boolean |
isPresent()
Checks if a value is present in the data stream.
|
boolean |
isTyped()
Checks if the current value in the wire is typed.
|
@Nullable Object |
marshallable(@NotNull Object object,
@NotNull SerializationStrategy strategy)
Reads a marshallable object from the wire and applies a specified SerializationStrategy.
|
Object |
objectWithInferredType(Object using,
SerializationStrategy strategy,
Class<?> type)
Reads an object from the wire with an inferred type.
|
long |
readLength()
Retrieves the length of the field in bytes, inclusive of any encoding and header character.
|
void |
resetState()
Resets the internal state of this ValueIn.
|
<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 kls,
@NotNull TriConsumer<T,K,ValueIn> tReader)
Processes a sequence of values from the wire, applying a TriConsumer to each item in the sequence.
|
@NotNull WireIn |
skipValue()
Skips the current value while reading.
|
@Nullable String |
text()
Reads and returns the text data.
|
@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.
|
<T> @NotNull WireIn |
time(T t,
@NotNull BiConsumer<T,LocalTime> setLocalTime) |
<T> T |
typedMarshallable()
Reads a typed marshallable object from the wire.
|
Type |
typeLiteral(BiFunction<CharSequence,ClassNotFoundException,Type> unresolvedHandler)
Reads a type literal from the wire, applying a handler for unresolved types.
|
<T> @NotNull WireIn |
typeLiteralAsText(T t,
@NotNull BiConsumer<T,CharSequence> ts)
Consumes a type literal (a class name) as text from the wire, passing it to a consumer.
|
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.
|
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.
|
<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.
|
<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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitarray, array, array, array, array, array, arrayDelta, arrayDelta, asEnum, asEnum, asEnum, byteBuffer, bytes, bytes, bytesLiteral, bytesLiteral, bytesStore, character, collection, collection, date, dateTime, float32, float64, int128, int32, int64, int64ForBinding, isBinary, lenientTypeLiteral, list, list, marshallable, marshallable, marshallableAsMap, marshallableAsMap, object, object, object, object, object, objectBestEffort, readBoolean, readByte, readChar, readDouble, reader0, readFloat, readInt, readLong, readLong, readShort, readString, sequence, sequence, sequenceWithLength, set, set, text, text, text, throwable, time, typedMarshallable, typeLiteral, typeLiteral, typeLiteral, typePrefixOrObject, uuid, zonedDateTime@Nullable public @Nullable String text()
ValueIn@Nullable public @Nullable StringBuilder textTo(@NotNull @NotNull StringBuilder sb)
ValueIn@Nullable
public @Nullable net.openhft.chronicle.bytes.Bytes<?> textTo(@NotNull
@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes)
ValueIn@NotNull public @NotNull WireIn bytes(@NotNull @NotNull net.openhft.chronicle.bytes.BytesOut<?> toBytes)
ValueIn@Nullable public @Nullable WireIn bytesSet(@NotNull @NotNull net.openhft.chronicle.bytes.PointerBytesStore toBytes)
ValueIn@NotNull public @NotNull WireIn bytesMatch(@NotNull @NotNull net.openhft.chronicle.bytes.BytesStore<?,?> compareBytes, @NotNull @NotNull net.openhft.chronicle.core.util.BooleanConsumer consumer)
ValueInbytesMatch in interface ValueIncompareBytes - The BytesStore to compare with.consumer - The BooleanConsumer to be called based on the comparison result.@NotNull public @NotNull WireIn bytes(@NotNull @NotNull net.openhft.chronicle.bytes.ReadBytesMarshallable wireInConsumer)
ValueInpublic byte[] bytes(byte[] using)
ValueIn@NotNull public @NotNull WireIn wireIn()
ValueInpublic long readLength()
ValueInreadLength in interface ValueIn@NotNull public @NotNull WireIn skipValue()
ValueIn@NotNull public <T> @NotNull WireIn bool(T t, @NotNull @NotNull net.openhft.chronicle.core.util.ObjBooleanConsumer<T> tFlag)
ValueIn@NotNull public <T> @NotNull WireIn int8(@NotNull T t, @NotNull @NotNull net.openhft.chronicle.core.util.ObjByteConsumer<T> tb)
ValueInint8 in interface ValueInT - 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 public <T> @NotNull WireIn uint8(@NotNull T t, @NotNull @NotNull net.openhft.chronicle.core.util.ObjShortConsumer<T> ti)
ValueInuint8 in interface ValueInT - 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 public <T> @NotNull WireIn int16(@NotNull T t, @NotNull @NotNull net.openhft.chronicle.core.util.ObjShortConsumer<T> ti)
ValueInint16 in interface ValueInT - 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 public <T> @NotNull WireIn uint16(@NotNull T t, @NotNull @NotNull ObjIntConsumer<T> ti)
ValueInuint16 in interface ValueInT - 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 public <T> @NotNull WireIn int32(@NotNull T t, @NotNull @NotNull ObjIntConsumer<T> ti)
ValueInint32 in interface ValueInT - 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 public <T> @NotNull WireIn uint32(@NotNull T t, @NotNull @NotNull ObjLongConsumer<T> tl)
ValueInuint32 in interface ValueInT - 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 public <T> @NotNull WireIn int64(@NotNull T t, @NotNull @NotNull ObjLongConsumer<T> tl)
ValueInint64 in interface ValueInT - 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 public <T> @NotNull WireIn float32(@NotNull T t, @NotNull @NotNull net.openhft.chronicle.core.util.ObjFloatConsumer<T> tf)
ValueInfloat32 in interface ValueInT - 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 public <T> @NotNull WireIn float64(@NotNull T t, @NotNull @NotNull ObjDoubleConsumer<T> td)
ValueInfloat64 in interface ValueInT - 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 public <T> @NotNull WireIn time(@NotNull T t, @NotNull @NotNull BiConsumer<T,LocalTime> setLocalTime)
@NotNull public <T> @NotNull WireIn zonedDateTime(@NotNull T t, @NotNull @NotNull BiConsumer<T,ZonedDateTime> tZonedDateTime)
ValueInzonedDateTime in interface ValueInT - 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 public <T> @NotNull WireIn date(@NotNull T t, @NotNull @NotNull BiConsumer<T,LocalDate> tLocalDate)
ValueInpublic boolean hasNext()
ValueInpublic boolean hasNextSequenceItem()
ValueInhasNextSequenceItem in interface ValueIn@NotNull public <T> @NotNull WireIn uuid(@NotNull T t, @NotNull @NotNull BiConsumer<T,UUID> tuuid)
ValueIn@NotNull public <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)
ValueInint64array in interface ValueInT - 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 public @NotNull WireIn int64(@NotNull @NotNull net.openhft.chronicle.core.values.LongValue value)
ValueIn@NotNull public @NotNull WireIn int32(@NotNull @NotNull net.openhft.chronicle.core.values.IntValue value)
ValueInpublic WireIn bool(@NotNull @NotNull net.openhft.chronicle.core.values.BooleanValue ret)
ValueIn@NotNull public <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)
ValueIn@NotNull public <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)
ValueInpublic <T> boolean sequence(@NotNull
T t,
@NotNull
@NotNull BiConsumer<T,ValueIn> tReader)
ValueInpublic <T> boolean sequence(List<T> list, @NotNull @NotNull List<T> buffer, Supplier<T> bufferAdd, ValueIn.Reader reader0)
ValueInsequence in interface ValueInlist - 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.@NotNull public <T,K> @NotNull WireIn sequence(@NotNull T t, K kls, @NotNull @NotNull TriConsumer<T,K,ValueIn> tReader) throws net.openhft.chronicle.core.io.InvalidMarshallableException
ValueInsequence in interface ValueInT - 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.kls - The second object to be passed to the TriConsumer.tReader - The TriConsumer that processes each item in the sequence.net.openhft.chronicle.core.io.InvalidMarshallableException@Nullable public <T> T applyToMarshallable(Function<WireIn,T> marshallableReader)
ValueInapplyToMarshallable in interface ValueInT - The type of the result from the Function.marshallableReader - The Function to apply to this ValueIn.@Nullable
public <T> T typedMarshallable()
throws net.openhft.chronicle.core.io.IORuntimeException
ValueIntypedMarshallable in interface ValueInnet.openhft.chronicle.core.io.IORuntimeException - if an I/O error occurs@NotNull public <T> @NotNull ValueIn typePrefix(T t, @NotNull @NotNull BiConsumer<T,CharSequence> ts)
ValueIntypePrefix in interface ValueInT - 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 public <T> @NotNull WireIn typeLiteralAsText(T t, @NotNull @NotNull BiConsumer<T,CharSequence> ts) throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException
ValueIntypeLiteralAsText in interface ValueInT - The type of the provided object.t - The object to which the type literal relates.ts - 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.public net.openhft.chronicle.core.pool.ClassLookup classLookup()
ValueInClassLookup instance associated with the current WireIn.
The ClassLookup allows for the resolution of class names to actual Class objects.classLookup in interface ValueIn@Nullable public @Nullable Object marshallable(@NotNull @NotNull Object object, @NotNull @NotNull SerializationStrategy strategy) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException
ValueInmarshallable in interface ValueInobject - 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 occurspublic boolean bool()
throws net.openhft.chronicle.core.io.IORuntimeException
ValueInpublic byte int8()
ValueInpublic short int16()
ValueInpublic int uint16()
ValueInpublic int int32()
ValueInpublic long int64()
ValueInpublic double float64()
ValueInpublic float float32()
ValueInpublic Type typeLiteral(BiFunction<CharSequence,ClassNotFoundException,Type> unresolvedHandler)
ValueIntypeLiteral in interface ValueInunresolvedHandler - The handler to apply for unresolved types.@NotNull public @NotNull BracketType getBracketType()
ValueIngetBracketType in interface ValueInpublic boolean isNull()
ValueInpublic Object objectWithInferredType(Object using, SerializationStrategy strategy, Class<?> type)
ValueInobjectWithInferredType in interface ValueInusing - 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.public boolean isPresent()
ValueInpublic boolean isTyped()
ValueInpublic Class<?> typePrefix()
ValueIntypePrefix in interface ValueInpublic void resetState()
ValueInresetState in interface ValueInCopyright © 2024. All rights reserved.