B - self type for fluent chainingpublic interface ByteStringParser<B extends ByteStringParser<B>> extends StreamingDataInput<B>
StreamingDataInput with helpers for parsing textual data directly from a
Bytes stream. Implementations consume data from the current read position and advance it
as characters or numbers are parsed.| Modifier and Type | Method and Description |
|---|---|
int |
lastDecimalPlaces()
Returns the number of decimal places in the last parsed floating-point number
(from the
parseDouble() or parseLongDecimal() methods). |
void |
lastDecimalPlaces(int lastDecimalPlaces)
Sets the number of decimal places in the last parsed number.
|
boolean |
lastNumberHadDigits()
Returns whether the last parsed number had any digits.
|
void |
lastNumberHadDigits(boolean lastNumberHadDigits)
Sets whether the last parsed number had any digits.
|
default void |
parse8bit(Appendable buffer,
@NotNull StopCharsTester stopCharsTester)
Parses an ISO-8859-1 encoded string from the byte string until the provided
stopCharsTester
detects an end condition. |
default void |
parse8bit(Appendable buffer,
@NotNull StopCharTester stopCharTester)
Parses an ISO-8859-1 encoded string from the byte string until the provided
stopCharTester
detects an end condition. |
default void |
parse8bit(Bytes<?> buffer,
@NotNull StopCharsTester stopCharsTester)
Parses an ISO-8859-1 encoded string from the byte string until the provided
stopCharsTester
detects an end condition. |
default String |
parse8bit(@NotNull StopCharTester stopCharTester)
Parses an ISO-8859-1 encoded string from the byte string until the provided
stopCharTester
detects an end condition. |
default void |
parse8bit(StringBuilder buffer,
@NotNull StopCharsTester stopCharsTester)
Parses an ISO-8859-1 encoded string from the byte string until the provided
stopCharsTester
detects an end condition. |
default @NotNull BigDecimal |
parseBigDecimal()
Parses text from the byte string as a BigDecimal.
|
default @Nullable Boolean |
parseBoolean()
Convenience wrapper for
parseBoolean(StopCharTester) using
StopCharTesters.NON_ALPHA_DIGIT. |
default @Nullable Boolean |
parseBoolean(@NotNull StopCharTester tester)
Parses a boolean token, stopping when
tester returns true. |
default double |
parseDouble()
Parses text from the byte string as a double-precision floating-point number.
|
default long |
parseFlexibleLong()
Parses a long integer from the byte string in either standard or scientific notation.
|
default float |
parseFloat()
Parses text from the byte string as a floating-point number.
|
default int |
parseInt()
Parses text from the byte string as an integer.
|
default long |
parseLong()
Parses text from the byte string as a long integer.
|
default long |
parseLongDecimal()
Parses the significant digits of a decimal number from the byte string.
|
default void |
parseUtf8(@NotNull Appendable buffer,
@NotNull StopCharsTester stopCharsTester)
Parses a UTF-8 encoded string from the byte string until the provided
stopCharsTester
detects an end condition. |
default void |
parseUtf8(@NotNull Appendable buffer,
@NotNull StopCharTester stopCharTester)
Parses a UTF-8 encoded string from the byte string until the provided
stopCharTester
detects an end condition. |
default @NotNull String |
parseUtf8(@NotNull StopCharTester stopCharTester)
Parses a UTF-8 encoded string from the byte string until the provided
stopCharTester
detects an end condition. |
default @NotNull Reader |
reader()
Creates a new
Reader from the byte string, assuming the byte string is
ISO-8859-1 encoded. |
default boolean |
skipTo(@NotNull StopCharTester tester)
Advances the read position until
tester.isStopChar() returns true or end of input
is reached. |
copyTo, copyTo, inputStream, lenient, lenient, parseHexLong, parseUtf8, parseUtf8, peekUnsignedByte, rawReadByte, rawReadInt, rawReadLong, read, read, read, read, read, read, read8bit, read8bit, read8bit, readBigDecimal, readBigInteger, readBoolean, readByte, readChar, readDouble, readEnum, readFloat, readHistogram, readIncompleteLong, readInt, readInt24, readLimit, readLimitToCapacity, readLong, readPosition, readPositionForHeader, readPositionRemaining, readPositionUnlimited, readShort, readSkip, readStopBit, readStopBitChar, readStopBitDecimal, readStopBitDouble, readUnsignedByte, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8, readUtf8, readUtf8, readVolatileInt, readVolatileLong, readWithLength, readWithLength, readWithLength0, uncheckedReadSkipBackOne, uncheckedReadSkipOne, uncheckedReadUnsignedByte, unsafeRead, unsafeReadObjectclearaddressForRead, addressForRead, addressForWrite, addressForWritePosition, byteOrder, bytesForRead, bytesForWrite, capacity, isDirectMemory, lengthWritten, readLimit, readPosition, readRemaining, realCapacity, realReadRemaining, realWriteRemaining, sharedMemory, start, writeLimit, writePosition, writeRemaining@NotNull default @NotNull Reader reader()
Reader from the byte string, assuming the byte string is
ISO-8859-1 encoded.Reader instance that can be used to read the bytes as characters.@Nullable default @Nullable Boolean parseBoolean(@NotNull @NotNull StopCharTester tester) throws BufferUnderflowException, ArithmeticException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
tester returns true. The recognised
tokens are case-insensitive variants of true/t/yes/y/1 and false/f/no/n/0.tester - stop condition for the parsenull if no recognised token was foundBufferUnderflowExceptionArithmeticExceptionnet.openhft.chronicle.core.io.ClosedIllegalStateExceptionnet.openhft.chronicle.core.io.ThreadingIllegalStateException@Nullable default @Nullable Boolean parseBoolean() throws BufferUnderflowException, ArithmeticException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
parseBoolean(StopCharTester) using
StopCharTesters.NON_ALPHA_DIGIT.BufferUnderflowExceptionArithmeticExceptionnet.openhft.chronicle.core.io.ClosedIllegalStateExceptionnet.openhft.chronicle.core.io.ThreadingIllegalStateException@NotNull default @NotNull String parseUtf8(@NotNull @NotNull StopCharTester stopCharTester) throws ArithmeticException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
stopCharTester
detects an end condition.stopCharTester - a StopCharTester used to detect the end of the string.String.ArithmeticException - If a numeric overflow occurs.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default void parseUtf8(@NotNull
@NotNull Appendable buffer,
@NotNull
@NotNull StopCharTester stopCharTester)
throws BufferUnderflowException,
ArithmeticException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
stopCharTester
detects an end condition. The parsed string is appended to the provided buffer.buffer - the Appendable to append the parsed string to.stopCharTester - a StopCharTester used to detect the end of the string.BufferUnderflowException - If there is insufficient data.ArithmeticException - If a numeric overflow occurs.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default void parseUtf8(@NotNull
@NotNull Appendable buffer,
@NotNull
@NotNull StopCharsTester stopCharsTester)
throws BufferUnderflowException,
net.openhft.chronicle.core.io.IORuntimeException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
stopCharsTester
detects an end condition. The parsed string is appended to the provided buffer.buffer - the Appendable to append the parsed string to.stopCharsTester - a StopCharsTester used to detect the end of the string.BufferUnderflowException - If there is insufficient data.net.openhft.chronicle.core.io.IORuntimeException - If an I/O error occurs.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default void parse8bit(Appendable buffer, @NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, BufferOverflowException, ArithmeticException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
stopCharTester
detects an end condition. The parsed string is appended to the provided buffer.buffer - the Appendable to append the parsed string to.stopCharTester - a StopCharTester used to detect the end of the string.BufferUnderflowException - If there is insufficient data.BufferOverflowException - If the buffer's capacity was exceeded.ArithmeticException - If a numeric overflow occurs.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default String parse8bit(@NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
stopCharTester
detects an end condition.stopCharTester - a StopCharTester used to detect the end of the string.String.BufferUnderflowException - If there is insufficient data.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default void parse8bit(Appendable buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, BufferOverflowException, ArithmeticException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
stopCharsTester
detects an end condition. The parsed string is appended to the provided buffer.buffer - the Appendable to append the parsed string to.stopCharsTester - a StopCharsTester used to detect the end of the string.BufferUnderflowException - If there is insufficient data.BufferOverflowException - If the buffer's capacity was exceeded.ArithmeticException - If a numeric overflow occurs.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default void parse8bit(Bytes<?> buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, BufferOverflowException, ArithmeticException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
stopCharsTester
detects an end condition. The parsed string is appended to the provided buffer.buffer - the Bytes object to append the parsed string to.stopCharsTester - a StopCharsTester used to detect the end of the string.BufferUnderflowException - If there is insufficient data.BufferOverflowException - If the buffer's capacity was exceeded.ArithmeticException - If a numeric overflow occurs.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default void parse8bit(StringBuilder buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
stopCharsTester
detects an end condition. The parsed string is appended to the provided buffer.buffer - the StringBuilder to append the parsed string to.stopCharsTester - a StopCharsTester used to detect the end of the string.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default int parseInt()
throws BufferUnderflowException,
ArithmeticException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
BufferUnderflowException - If there is insufficient data.ArithmeticException - If a numeric overflow occurs.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default long parseLong()
throws BufferUnderflowException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
BufferUnderflowException - If there is insufficient data.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default long parseFlexibleLong()
throws BufferUnderflowException,
net.openhft.chronicle.core.io.IORuntimeException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
parseDouble() to long).net.openhft.chronicle.core.io.IORuntimeException - If the parsed value corresponds to a fractional number or to a number outside the long's range.BufferUnderflowException - If there is insufficient data.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default float parseFloat()
throws BufferUnderflowException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
lastDecimalPlaces().BufferUnderflowException - If there is insufficient data.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default double parseDouble()
throws BufferUnderflowException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
lastDecimalPlaces().BufferUnderflowException - If there is insufficient data.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.default long parseLongDecimal()
throws BufferUnderflowException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
lastDecimalPlaces().BufferUnderflowException - If there is insufficient data.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.int lastDecimalPlaces()
parseDouble() or parseLongDecimal() methods).void lastDecimalPlaces(int lastDecimalPlaces)
lastDecimalPlaces - the number of decimal places to set, if positive; otherwise 0.boolean lastNumberHadDigits()
void lastNumberHadDigits(boolean lastNumberHadDigits)
lastNumberHadDigits - the new value to set, true if the last parsed number had digits, false otherwise.default boolean skipTo(@NotNull
@NotNull StopCharTester tester)
throws net.openhft.chronicle.core.io.ClosedIllegalStateException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
tester.isStopChar() returns true or end of input
is reached. The terminating character itself remains unread.net.openhft.chronicle.core.io.ClosedIllegalStateExceptionnet.openhft.chronicle.core.io.ThreadingIllegalStateException@NotNull default @NotNull BigDecimal parseBigDecimal() throws ArithmeticException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
ArithmeticException - If a numerical overflow occurs during the operation.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.Copyright © 2026 Chronicle Software Ltd. All rights reserved.