ValueIn.Reader| Constructor and Description |
|---|
TextValueIn() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
applyToMarshallable(@NotNull 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 value)
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 bytesConsumer)
Reads byte data using the provided ReadBytesMarshallable.
|
@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.
|
void |
checkRewind()
Checks if the previous character is an end character, and if so, moves the read position back by one byte.
|
void |
checkRewindDouble()
Checks for rewind condition.
|
net.openhft.chronicle.core.pool.ClassLookup |
classLookup()
Retrieves a
ClassLookup instance associated with the current WireIn. |
protected void |
consumeAny() |
net.openhft.chronicle.wire.ValueInState |
curr()
Retrieves the current state from the stack.
|
<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.
|
@NotNull Demarshallable |
demarshallable(@NotNull Class<?> clazz)
Create and initialize an instance of a given class using the wire input.
|
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.
|
protected boolean |
isASeparator(int nextChar)
Checks whether the provided character acts as a separator.
|
boolean |
isNull()
Checks if the current value in the wire is null.
|
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,
@NotNull SerializationStrategy strategy,
Class<?> type)
Reads an object from the wire with an inferred type.
|
protected int |
peekBack() |
void |
popState()
Pops the most recent reading state from the stack, reverting
to the previous state.
|
void |
pushState()
Pushes the current reading state onto the stack, allowing for
nested or sequential value reading.
|
long |
readLength()
Retrieves the length of the field in bytes, inclusive of any encoding and header character.
|
protected long |
readLengthMarshallable() |
protected @Nullable Object |
readNumber()
Attempts to read a number from the current stream context, dynamically determining
its potential type and format.
|
void |
resetState()
Resets the internal state of this ValueIn.
|
<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)
Handles the processing of a sequence, delegating to an overloaded version of itself.
|
<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) |
String |
toString() |
<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> classNameConsumer)
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.
|
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.
|
<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, 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, isPresent, 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, sequenceWithLength, set, set, text, text, text, throwable, time, typedMarshallable, typeLiteral, typeLiteral, typeLiteral, uuid, zonedDateTimepublic void resetState()
ValueInresetState in interface ValueInpublic void pushState()
public void popState()
public net.openhft.chronicle.wire.ValueInState curr()
@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 BracketType getBracketType()
ValueIngetBracketType in interface ValueInprotected int peekBack()
@NotNull public @NotNull WireIn bytesMatch(@NotNull @NotNull net.openhft.chronicle.bytes.BytesStore<?,?> compareBytes, 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.BytesOut<?> toBytes)
ValueIn@Nullable public @Nullable WireIn bytesSet(@NotNull @NotNull net.openhft.chronicle.bytes.PointerBytesStore toBytes)
ValueIn@NotNull public @NotNull WireIn bytes(@NotNull @NotNull net.openhft.chronicle.bytes.ReadBytesMarshallable bytesConsumer)
ValueInpublic byte[] bytes(byte[] using)
ValueIn@NotNull public @NotNull WireIn wireIn()
ValueInpublic long readLength()
ValueInreadLength in interface ValueIn@NotNull public @NotNull WireIn skipValue()
ValueInprotected long readLengthMarshallable()
protected void consumeAny()
protected boolean isASeparator(int nextChar)
nextChar - Character to be checked@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)
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 value)
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) throws net.openhft.chronicle.core.io.InvalidMarshallableException
sequence in interface ValueInT - The type of items in the lists.list - The main list that should be populated based on the buffer.buffer - A temporary buffer used for staging data.bufferAdd - A supplier function that can add items to the buffer.reader0 - This seems to be an unused reader, possibly for future extensions.net.openhft.chronicle.core.io.InvalidMarshallableException - if there's an error during the sequence processing.public <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
ValueIn@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.InvalidMarshallableExceptionpublic boolean hasNext()
ValueInpublic boolean hasNextSequenceItem()
ValueInhasNextSequenceItem in interface ValueInpublic <T> T applyToMarshallable(@NotNull
@NotNull Function<WireIn,T> marshallableReader)
ValueInapplyToMarshallable in interface ValueInT - The type of the result from the Function.marshallableReader - The Function to apply to this ValueIn.@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.public Class<?> typePrefix()
ValueIntypePrefix in interface ValueInpublic Object typePrefixOrObject(Class<?> tClass)
ValueIntypePrefixOrObject in interface ValueIntClass - the super-class, or actual class to usepublic boolean isTyped()
ValueIn@NotNull public <T> @NotNull WireIn typeLiteralAsText(T t, @NotNull @NotNull BiConsumer<T,CharSequence> classNameConsumer) 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.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.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 ValueInpublic Type typeLiteral(BiFunction<CharSequence,ClassNotFoundException,Type> unresolvedHandler)
ValueIntypeLiteral in interface ValueInunresolvedHandler - The handler to apply for unresolved types.@Nullable public @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
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 occursnet.openhft.chronicle.core.io.InvalidMarshallableException - if the marshallable object is invalid@NotNull public @NotNull Demarshallable demarshallable(@NotNull @NotNull Class<?> clazz)
clazz - The class to instantiate.@Nullable
public <T> T typedMarshallable()
throws net.openhft.chronicle.core.io.InvalidMarshallableException
ValueIntypedMarshallable in interface ValueInnet.openhft.chronicle.core.io.InvalidMarshallableException - if the marshallable object is invalidpublic boolean bool()
ValueInpublic byte int8()
ValueInpublic short int16()
ValueInpublic int int32()
ValueInpublic int uint16()
ValueInpublic long int64()
ValueInpublic void checkRewind()
public void checkRewindDouble()
public double float64()
ValueInpublic float float32()
ValueInpublic boolean isNull()
ValueInpublic Object objectWithInferredType(Object using, @NotNull @NotNull SerializationStrategy strategy, Class<?> type) throws net.openhft.chronicle.core.io.InvalidMarshallableException
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.net.openhft.chronicle.core.io.InvalidMarshallableException - if the object is invalid@Nullable protected @Nullable Object readNumber()
The method supports various formats including long, double, LocalTime,
LocalDate, and ZonedDateTime. If the string representation is not
recognizable as any of these formats, the original string is returned.
Copyright © 2024. All rights reserved.