public interface BytesIn<Underlying> extends StreamingDataInput<Bytes<Underlying>>
Modifier and Type | Method and Description |
---|---|
long |
addressForRead(long offset)
Obtain the underlying addressForRead.
|
long |
addressForWrite(long offset)
Obtain the underlying addressForRead.
|
default ByteOrder |
byteOrder() |
Bytes |
bytesForRead() |
Bytes |
bytesForWrite() |
default MethodReader |
bytesMethodReader(Object... objects)
Reads messages from this tails as methods.
|
default 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.
|
default void |
parse8bit(Appendable buffer,
StopCharsTester stopCharsTester)
parse text with ISO-8859-1 decoding as character terminated.
|
default void |
parse8bit(Appendable buffer,
StopCharTester stopCharTester)
parse text with ISO-8859-1 decoding as character terminated.
|
default BigDecimal |
parseBigDecimal() |
default Boolean |
parseBoolean(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 long |
parseLong()
parse text as a long integer.
|
default long |
parseLongDecimal()
Parse the significant digits of a decimal number.
|
default void |
parseUTF(Appendable buffer,
StopCharsTester stopCharsTester)
Deprecated.
|
default void |
parseUTF(Appendable buffer,
StopCharTester stopCharTester)
Deprecated.
|
default String |
parseUTF(StopCharTester stopCharTester)
Deprecated.
|
default void |
parseUtf8(Appendable buffer,
StopCharsTester stopCharsTester)
parse text with UTF-8 decoding as one or two character terminated.
|
default void |
parseUtf8(Appendable buffer,
StopCharTester stopCharTester)
parse text with UTF-8 decoding as character terminated.
|
default String |
parseUtf8(StopCharTester stopCharTester)
parse text with UTF-8 decoding as character terminated.
|
default Reader |
reader()
Access these bytes as an ISO-8859-1 encoded Reader
|
default long |
readLimit() |
default long |
readPosition()
The read position must be start() <= readPosition() && readPosition() <= readLimit() && readPosition < safeLimit()
|
default long |
readRemaining() |
boolean |
sharedMemory() |
default boolean |
skipTo(StopCharTester tester)
Skip text until a terminating character is reached.
|
default long |
start() |
default long |
writeLimit() |
default long |
writePosition()
The read position must be readPosition() <= writePosition() && writePosition() <= writeLimit()
|
default long |
writeRemaining() |
copyTo, copyTo, inputStream, nativeRead, parseHexLong, parseUTF, parseUtf8, peekUnsignedByte, read, read, read, read, read8bit, read8bit, read8bit, read8bit, readBoolean, readByte, readDouble, readEnum, readFloat, readHistogram, readInt, readLimit, readLong, readPosition, readPositionRemaining, readPositionUnlimited, readShort, readSkip, readStopBit, readStopBitDecimal, readStopBitDouble, readUnsignedByte, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8, readUTFΔ, readUTFΔ, readVolatileInt, readVolatileLong, readWithLength, readWithLength, readWithLength0, uncheckedReadSkipBackOne, uncheckedReadSkipOne, uncheckedReadUnsignedByte
clear
@NotNull default MethodReader bytesMethodReader(Object... objects)
objects
- which implement the methods serialized to the file.@NotNull default BytesMethodReaderBuilder bytesMethodReaderBuilder()
@NotNull default Reader reader()
@Nullable default Boolean parseBoolean(@NotNull StopCharTester tester)
false: f, false, n, no, 0
true: t, true, y, yes, 1
tester
- to detect the end of the text.@NotNull default String parseUtf8(@NotNull StopCharTester stopCharTester)
stopCharTester
- to check if the end has been reached.@NotNull @Deprecated default String parseUTF(@NotNull StopCharTester stopCharTester)
default void parseUtf8(@NotNull Appendable buffer, @NotNull StopCharTester stopCharTester) throws BufferUnderflowException
buffer
- to populatestopCharTester
- to check if the end has been reached.BufferUnderflowException
@Deprecated default void parseUTF(@NotNull Appendable buffer, @NotNull StopCharTester stopCharTester) throws BufferUnderflowException
BufferUnderflowException
default void parseUtf8(@NotNull Appendable buffer, @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException
buffer
- to populatestopCharsTester
- to check if the end has been reached.BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
@Deprecated default void parseUTF(@NotNull Appendable buffer, @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
default void parse8bit(Appendable buffer, @NotNull StopCharTester stopCharTester) throws BufferUnderflowException
buffer
- to populatestopCharTester
- to check if the end has been reached.BufferUnderflowException
default void parse8bit(Appendable buffer, @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException
buffer
- to populatestopCharsTester
- to check if the end has been reached.BufferUnderflowException
default long parseLong() throws BufferUnderflowException
BufferUnderflowException
default double parseDouble() throws BufferUnderflowException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowException
default long parseLongDecimal() throws BufferUnderflowException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowException
int lastDecimalPlaces()
void lastDecimalPlaces(int lastDecimalPlaces)
lastDecimalPlaces
- set the number of decimal places if positive, otherwise 0.default boolean skipTo(@NotNull StopCharTester tester)
tester
- to stop at@NotNull default BigDecimal parseBigDecimal()
default long start()
default long capacity()
default long readPosition()
default long writePosition()
default long readRemaining()
default long writeRemaining()
default long readLimit()
default long writeLimit()
long addressForRead(long offset) throws UnsupportedOperationException, BufferUnderflowException
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()long addressForWrite(long offset) throws UnsupportedOperationException, BufferOverflowException
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()default ByteOrder byteOrder()
@NotNull Bytes bytesForRead() throws IllegalStateException
IllegalStateException
@NotNull Bytes bytesForWrite() throws IllegalStateException
IllegalStateException
boolean compareAndSwapInt(long offset, int expected, int value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
boolean compareAndSwapLong(long offset, long expected, long value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
default boolean compareAndSwapFloat(long offset, float expected, float value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
default boolean compareAndSwapDouble(long offset, double expected, double value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
boolean sharedMemory()
boolean isDirectMemory()
Copyright © 2017. All rights reserved.