public interface BytesIn<Underlying> extends RandomDataInput, StreamingDataInput<Bytes<Underlying>>
charToString
Modifier and Type | Method and Description |
---|---|
long |
addressForRead(long offset)
Obtain the underlying addressForRead.
|
default long |
addressForRead(long offset,
int buffer) |
long |
addressForWrite(long offset)
Obtain the underlying addressForRead.
|
long |
addressForWritePosition() |
default ByteOrder |
byteOrder() |
@NotNull Bytes |
bytesForRead() |
@NotNull Bytes |
bytesForWrite() |
default @NotNull MethodReader |
bytesMethodReader(Object... objects)
Reads messages from this tails as methods.
|
default @NotNull BytesMethodReaderBuilder |
bytesMethodReaderBuilder() |
default long |
capacity() |
default boolean |
compareAndSwapDouble(long offset,
double expected,
double value)
Perform a 64-bit double CAS at a given offset.
|
default boolean |
compareAndSwapFloat(long offset,
float expected,
float value)
Perform a 32-bit float CAS at a given offset.
|
boolean |
compareAndSwapInt(long offset,
int expected,
int value)
Perform a 32-bit CAS at a given offset.
|
boolean |
compareAndSwapLong(long offset,
long expected,
long value)
Perform a 64-bit CAS at a given offset.
|
boolean |
isDirectMemory() |
int |
lastDecimalPlaces() |
void |
lastDecimalPlaces(int lastDecimalPlaces)
Store the last number of decimal places.
|
boolean |
lastNumberHadDigits() |
void |
lastNumberHadDigits(boolean lastNumberHadDigits) |
default void |
parse8bit(Appendable buffer,
@NotNull StopCharsTester stopCharsTester)
parse text with ISO-8859-1 decoding as character terminated.
|
default void |
parse8bit(Appendable buffer,
@NotNull StopCharTester stopCharTester)
parse text with ISO-8859-1 decoding as character terminated.
|
default void |
parse8bit(Bytes buffer,
@NotNull StopCharsTester stopCharsTester) |
default String |
parse8bit(@NotNull StopCharTester stopCharTester)
parse text with ISO-8859-1 decoding as character terminated.
|
default void |
parse8bit(StringBuilder buffer,
@NotNull StopCharsTester stopCharsTester) |
default @NotNull BigDecimal |
parseBigDecimal() |
default @Nullable Boolean |
parseBoolean() |
default @Nullable Boolean |
parseBoolean(@NotNull StopCharTester tester)
Return true or false, or null if it could not be detected
as true or false.
|
default double |
parseDouble()
parse text as a double decimal.
|
default float |
parseFloat()
parse text as a float decimal.
|
default int |
parseInt()
parse text as an int.
|
default long |
parseLong()
parse text as a long integer.
|
default long |
parseLongDecimal()
Parse the significant digits of a decimal number.
|
default void |
parseUTF(@NotNull Appendable buffer,
@NotNull StopCharsTester stopCharsTester)
Deprecated.
|
default void |
parseUTF(@NotNull Appendable buffer,
@NotNull StopCharTester stopCharTester)
Deprecated.
|
default @NotNull String |
parseUTF(@NotNull StopCharTester stopCharTester)
Deprecated.
|
default void |
parseUtf8(@NotNull Appendable buffer,
@NotNull StopCharsTester stopCharsTester)
parse text with UTF-8 decoding as one or two character terminated.
|
default void |
parseUtf8(@NotNull Appendable buffer,
@NotNull StopCharTester stopCharTester)
parse text with UTF-8 decoding as character terminated.
|
default @NotNull String |
parseUtf8(@NotNull StopCharTester stopCharTester)
parse text with UTF-8 decoding as character terminated.
|
default @NotNull Reader |
reader()
Access these bytes as an ISO-8859-1 encoded Reader
|
default long |
readLimit() |
<T extends ReadBytesMarshallable> |
readMarshallableLength16(Class<T> tClass,
T object) |
default <T> T |
readObject(Class<T> componentType0) |
default long |
readPosition()
The read position must be
start() <= readPosition() && readPosition() <= readLimit() && readPosition < safeLimit() |
default long |
readRemaining() |
default long |
realReadRemaining() |
default long |
realWriteRemaining() |
boolean |
sharedMemory() |
default boolean |
skipTo(@NotNull StopCharTester tester)
Skip text until a terminating character is reached.
|
default long |
start() |
void |
testAndSetInt(long offset,
int expected,
int value) |
default long |
writeLimit() |
default long |
writePosition()
The write position must be
readPosition() <= writePosition() && writePosition() <= writeLimit() |
default long |
writeRemaining() |
addAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, canReadDirect, compareUtf8, copyTo, copyTo, createCharToString, fastHash, findByte, nativeRead, parseLong, peekUnsignedByte, peekVolatileInt, printable, read, readBoolean, readByte, readDouble, readFloat, readIncompleteLong, readInt, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileByte, readVolatileDouble, readVolatileFloat, readVolatileInt, readVolatileLong, readVolatileShort, realCapacity, subBytes, toByteArray, toTemporaryDirectByteBuffer
copyTo, copyTo, inputStream, lenient, lenient, parseHexLong, parseUTF, parseUtf8, parseUtf8, peekUnsignedByte, rawReadByte, rawReadInt, rawReadLong, read, read, read, read, read, read, read8bit, read8bit, read8bit, read8bit, readBoolean, readByte, readChar, readDouble, readEnum, readFloat, readHistogram, readIncompleteLong, readInt, readInt24, readLimit, readLimitToCapacity, readLong, readPosition, readPositionRemaining, readPositionUnlimited, readShort, readSkip, readStopBit, readStopBitChar, readStopBitDecimal, readStopBitDouble, readUnsignedByte, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8, readUtf8, readUtf8, readUTFΔ, readUTFΔ, readVolatileInt, readVolatileLong, readWithLength, readWithLength, readWithLength0, uncheckedReadSkipBackOne, uncheckedReadSkipOne, uncheckedReadUnsignedByte, unsafeReadObject, unsafeReadObject
clear
@NotNull default @NotNull MethodReader bytesMethodReader(Object... objects)
objects
- which implement the methods serialized to the file.@NotNull default @NotNull BytesMethodReaderBuilder bytesMethodReaderBuilder()
<T extends ReadBytesMarshallable> T readMarshallableLength16(Class<T> tClass, T object) throws BufferUnderflowException, IllegalStateException
default <T> T readObject(Class<T> componentType0) throws BufferUnderflowException, IllegalArgumentException, IllegalStateException, ArithmeticException, BufferOverflowException
@NotNull default @NotNull Reader reader()
@Nullable default @Nullable Boolean parseBoolean(@NotNull @NotNull StopCharTester tester) throws BufferUnderflowException, IllegalStateException, ArithmeticException
false: f, false, n, no, 0
true: t, true, y, yes, 1
tester
- to detect the end of the text.BufferUnderflowException
IllegalStateException
ArithmeticException
@Nullable default @Nullable Boolean parseBoolean() throws BufferUnderflowException, IllegalStateException, ArithmeticException
@NotNull default @NotNull String parseUtf8(@NotNull @NotNull StopCharTester stopCharTester) throws IllegalStateException, ArithmeticException
stopCharTester
- to check if the end has been reached.IllegalStateException
ArithmeticException
@NotNull @Deprecated default @NotNull String parseUTF(@NotNull @NotNull StopCharTester stopCharTester) throws IllegalStateException, ArithmeticException
default void parseUtf8(@NotNull @NotNull Appendable buffer, @NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, IllegalStateException, ArithmeticException
buffer
- to populatestopCharTester
- to check if the end has been reached.BufferUnderflowException
IllegalStateException
ArithmeticException
@Deprecated default void parseUTF(@NotNull @NotNull Appendable buffer, @NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, IllegalStateException, ArithmeticException
default void parseUtf8(@NotNull @NotNull Appendable buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException, IllegalStateException
buffer
- to populatestopCharsTester
- to check if the end has been reached.BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
IllegalStateException
@Deprecated default void parseUTF(@NotNull @NotNull Appendable buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException, IllegalStateException
BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
IllegalStateException
default void parse8bit(Appendable buffer, @NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, BufferOverflowException, IllegalStateException, ArithmeticException
buffer
- to populatestopCharTester
- to check if the end has been reached.BufferUnderflowException
BufferOverflowException
IllegalStateException
ArithmeticException
default String parse8bit(@NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, IllegalStateException
stopCharTester
- to check if the end has been reached.BufferUnderflowException
IllegalStateException
default void parse8bit(Appendable buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, BufferOverflowException, IllegalStateException, ArithmeticException
buffer
- to populatestopCharsTester
- to check if the end has been reached.BufferUnderflowException
BufferOverflowException
IllegalStateException
ArithmeticException
default void parse8bit(Bytes buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, BufferOverflowException, IllegalStateException, ArithmeticException
default void parse8bit(StringBuilder buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws IllegalStateException
IllegalStateException
default int parseInt() throws BufferUnderflowException, ArithmeticException, IllegalStateException
BufferUnderflowException
ArithmeticException
IllegalStateException
default long parseLong() throws BufferUnderflowException, IllegalStateException
BufferUnderflowException
IllegalStateException
default float parseFloat() throws BufferUnderflowException, IllegalStateException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowException
IllegalStateException
default double parseDouble() throws BufferUnderflowException, IllegalStateException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowException
IllegalStateException
default long parseLongDecimal() throws BufferUnderflowException, IllegalStateException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowException
IllegalStateException
int lastDecimalPlaces()
void lastDecimalPlaces(int lastDecimalPlaces)
lastDecimalPlaces
- set the number of decimal places if positive, otherwise 0.boolean lastNumberHadDigits()
void lastNumberHadDigits(boolean lastNumberHadDigits)
lastNumberHadDigits
- set the last number had digitsdefault boolean skipTo(@NotNull @NotNull StopCharTester tester) throws IllegalStateException
tester
- to stop atIllegalStateException
@NotNull default @NotNull BigDecimal parseBigDecimal() throws IllegalStateException, ArithmeticException
default long start()
default long capacity()
default long readPosition()
start() <= readPosition() && readPosition() <= readLimit() && readPosition < safeLimit()
default long writePosition()
readPosition() <= writePosition() && writePosition() <= writeLimit()
default long readRemaining()
default long realReadRemaining()
default long writeRemaining()
default long realWriteRemaining()
default long readLimit()
default long writeLimit()
long addressForRead(long offset) throws UnsupportedOperationException, BufferUnderflowException, IllegalStateException
offset
- within this buffer. addressForRead(start()) is the actual addressForRead of the first byte.UnsupportedOperationException
- if the underlying buffer is on the heapBufferUnderflowException
- if the offset is before the start() or the after the capacity()IllegalStateException
default long addressForRead(long offset, int buffer) throws UnsupportedOperationException, BufferUnderflowException, IllegalStateException
long addressForWrite(long offset) throws UnsupportedOperationException, BufferOverflowException, IllegalStateException
offset
- within this buffer. addressForRead(start()) is the actual addressForRead of the first byte.UnsupportedOperationException
- if the underlying buffer is on the heapBufferOverflowException
- if the offset is before the start() or the after the capacity()IllegalStateException
long addressForWritePosition() throws UnsupportedOperationException, BufferOverflowException, IllegalStateException
default ByteOrder byteOrder()
@NotNull @NotNull Bytes bytesForRead() throws IllegalStateException
IllegalStateException
@NotNull @NotNull Bytes bytesForWrite() throws IllegalStateException
IllegalStateException
boolean compareAndSwapInt(long offset, int expected, int value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
void testAndSetInt(long offset, int expected, int value) throws BufferOverflowException, IllegalStateException
boolean compareAndSwapLong(long offset, long expected, long value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
default boolean compareAndSwapFloat(long offset, float expected, float value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
default boolean compareAndSwapDouble(long offset, double expected, double value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
boolean sharedMemory()
boolean isDirectMemory()
Copyright © 2021. All rights reserved.