public class GuardedNativeBytes<Underlying> extends NativeBytes<Underlying>
NativeBytes.NativeSubBytesbytesStore, isPresent, readPosition, writeLimit, writePositionDEFAULT_BYTE_BUFFER_CAPACITY, MAX_BYTE_BUFFER_CAPACITY, MAX_CAPACITYcharToStringJAVA9_STRING_CODER_LATIN, JAVA9_STRING_CODER_UTF16| Constructor and Description |
|---|
GuardedNativeBytes(@NotNull BytesStore store) |
| Modifier and Type | Method and Description |
|---|---|
default long |
addressForRead(long offset,
int buffer) |
default ByteOrder |
byteOrder() |
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.
|
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.
|
byte |
rawReadByte() |
int |
rawReadInt() |
Bytes<Underlying> |
rawWriteByte(byte i8) |
Bytes<Underlying> |
rawWriteInt(int i) |
byte |
readByte() |
double |
readDouble() |
default @NotNull Reader |
reader()
Access these bytes as an ISO-8859-1 encoded Reader
|
float |
readFloat() |
int |
readInt() |
long |
readLong() |
short |
readShort() |
long |
readStopBit() |
char |
readStopBitChar() |
int |
readUnsignedByte() |
default boolean |
skipTo(@NotNull StopCharTester tester)
Skip text until a terminating character is reached.
|
@NotNull Bytes<Underlying> |
writeByte(byte i8) |
@NotNull Bytes<Underlying> |
writeDouble(double d) |
@NotNull Bytes<Underlying> |
writeFloat(float f) |
@NotNull Bytes<Underlying> |
writeInt(int i) |
@NotNull Bytes |
writeLong(long i64) |
default long |
writeRemaining() |
@NotNull Bytes<Underlying> |
writeShort(short i16) |
@NotNull Bytes<Underlying> |
writeStopBit(char x) |
@NotNull Bytes<Underlying> |
writeStopBit(long x)
Write a stop bit encoded long
|
areNewGuarded, capacity, copyOf, ensureCapacity, isElastic, nativeBytes, nativeBytes, readRemaining, resetNewGuarded, setNewGuarded, wrapWithNativeBytes, write, write, write8bit, writeCheckOffset, writeOffsetPositionMoved, writeSomeappend, append8bit, append8bit, append8bit, append8bit0, appendUtf8, appendUtf8, byteCheckSum, bytesForRead, bytesStore, compareTo, copy, equalBytes, isEqual, maxSize, offset, optimisedWrite, read, read8Bit, readVolatileLong, realCapacity, toString, toString0, toTemporaryDirectByteBuffer, vanillaBytes, write, writeaddressForRead, addressForWrite, addressForWritePosition, append, byteCheckSum, byteCheckSum, bytesStore, canReadDirect, canWriteDirect, checkRefCount, clear, clearAndPad, compact, compareAndSwapInt, compareAndSwapLong, equals, equalsBytes, hashCode, isDirectMemory, isPresent, isPresent, lastDecimalPlaces, lastDecimalPlaces, lenient, lenient, move, nativeRead, nativeRead, nativeWrite, nativeWrite, peekUnsignedByte, peekUnsignedByte, prewrite, prewrite, prewriteByte, prewriteInt, prewriteLong, prewriteOffsetPositionMoved, prewriteShort, readByte, readDouble, readFloat, readInt, readLimit, readLimit, readLong, readOffsetPositionMoved, readPosition, readPosition, readShort, readSkip, readUnsignedByte, readVolatileByte, readVolatileInt, readVolatileInt, readVolatileLong, readVolatileShort, realWriteRemaining, refCount, release, reserve, safeCopySize, start, testAndSetInt, tryReserve, uncheckedReadSkipBackOne, uncheckedReadSkipOne, uncheckedReadUnsignedByte, underlyingObject, write, write, write, write, writeByte, writeCheckOffset0, writeDouble, writeDoubleAndInt, writeFloat, writeInt, writeIntAdv, writeLimit, writeLimit, writeLong, writeLongAdv, writeOffsetPositionMoved, writeOrderedInt, writeOrderedInt, writeOrderedLong, writeOrderedLong, writePosition, writePosition, writeShort, writeSkip, writeSome, writeVolatileByte, writeVolatileInt, writeVolatileLong, writeVolatileShortclone, finalize, getClass, notify, notifyAll, wait, wait, waitbytesStoreallocateDirect, allocateDirect, allocateElasticDirect, allocateElasticDirect, copyTo, copyTo, elasticByteBuffer, elasticByteBuffer, elasticByteBuffer, elasticHeapByteBuffer, from, from, fromHexString, fromString, indexOf, indexOf, indexOf, indexOf, isClear, readBigDecimal, readBigInteger, readMarshallableLength16, readWithLength, readWrite, safeLimit, sharedMemory, toHexString, toHexString, toHexString, toString, toString, toString, unchecked, unchecked, unwrite, wrapForRead, wrapForRead, wrapForWrite, wrapForWrite, write, writeMarshallableLength16addAndGetByteNotAtomic, addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetLongNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, addAndGetUnsignedIntNotAtomic, addAndGetUnsignedShortNotAtomic, bytesForWrite, charAt, cipher, cipher, contentEquals, empty, endsWith, inside, inside, isEmpty, length, longCheckSum, nativePointer, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, wrap, writeMaxLong, zeroOutappend, append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloatchars, codePointsbytesMethodReader, bytesMethodReaderBuilder, readObjectaddAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, compareUtf8, copyTo, copyTo, createCharToString, fastHash, findByte, parseLong, peekVolatileInt, printable, read, readBoolean, readIncompleteLong, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileDouble, readVolatileFloat, subBytes, toByteArrayinputStream, parseHexLong, parseUTF, parseUtf8, read, read, read, read, read8bit, read8bit, read8bit, read8bit, readBoolean, readChar, readEnum, readHistogram, readIncompleteLong, readInt24, readPositionRemaining, readPositionUnlimited, readStopBitDecimal, readStopBitDouble, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8, readUTFΔ, readUTFΔ, readWithLength, readWithLength, readWithLength0bytesMethodWriter, bytesMethodWriterBuilder, writeObjectappend, append, append, append, append, append, append, append, append8bit, append8bit, appendBase, appendBase16, appendBase16, appendDateMillis, appendDecimal, appendTimeMillis, writeralignBy, appendUtf8, appendUtf8, appendUtf8, appendUtf8, copyFrom, outputStream, write, write, write, write, write8bit, write8bit, write8bit, writeBigDecimal, writeBigInteger, writeBoolean, writeChar, writeEnum, writeHistogram, writeInt24, writePositionRemaining, writeStopBit, writeStopBitDecimal, writeUnsignedByte, writeUnsignedInt, writeUnsignedInt24, writeUnsignedShort, writeUtf8, writeUtf8, writeUTFΔ, writeWithLengthprependcomment, indent, retainsCommentspublic GuardedNativeBytes(@NotNull
@NotNull BytesStore store)
throws IllegalStateException
IllegalStateException@NotNull public @NotNull Bytes<Underlying> writeByte(byte i8) throws BufferOverflowException
writeByte in interface StreamingDataOutput<Bytes<Underlying>>writeByte in class NativeBytes<Underlying>BufferOverflowExceptionpublic Bytes<Underlying> rawWriteByte(byte i8) throws BufferOverflowException
BufferOverflowExceptionpublic Bytes<Underlying> rawWriteInt(int i) throws BufferOverflowException
BufferOverflowExceptionpublic byte readByte()
readByte in class AbstractBytes<Underlying>public byte rawReadByte()
public int rawReadInt()
public int readUnsignedByte()
readUnsignedByte in class AbstractBytes<Underlying>@NotNull public @NotNull Bytes<Underlying> writeShort(short i16) throws BufferOverflowException
writeShort in interface StreamingDataOutput<Bytes<Underlying>>writeShort in class AbstractBytes<Underlying>BufferOverflowExceptionpublic short readShort()
throws BufferUnderflowException
readShort in class AbstractBytes<Underlying>BufferUnderflowException@NotNull public @NotNull Bytes<Underlying> writeStopBit(char x) throws BufferOverflowException
BufferOverflowException@NotNull public @NotNull Bytes<Underlying> writeStopBit(long x) throws BufferOverflowException
StreamingDataOutputx - long to writeBufferOverflowExceptionpublic long readStopBit()
throws net.openhft.chronicle.core.io.IORuntimeException
net.openhft.chronicle.core.io.IORuntimeExceptionpublic char readStopBitChar()
throws net.openhft.chronicle.core.io.IORuntimeException
net.openhft.chronicle.core.io.IORuntimeException@NotNull public @NotNull Bytes<Underlying> writeInt(int i) throws BufferOverflowException
writeInt in interface StreamingDataOutput<Bytes<Underlying>>writeInt in class AbstractBytes<Underlying>BufferOverflowExceptionpublic int readInt()
throws BufferUnderflowException
readInt in class AbstractBytes<Underlying>BufferUnderflowException@NotNull public @NotNull Bytes writeLong(long i64) throws BufferOverflowException
writeLong in interface StreamingDataOutput<Bytes<Underlying>>writeLong in class NativeBytes<Underlying>BufferOverflowExceptionpublic long readLong()
throws BufferUnderflowException
readLong in class AbstractBytes<Underlying>BufferUnderflowException@NotNull public @NotNull Bytes<Underlying> writeFloat(float f) throws BufferOverflowException
writeFloat in interface StreamingDataOutput<Bytes<Underlying>>writeFloat in class AbstractBytes<Underlying>BufferOverflowExceptionpublic float readFloat()
throws BufferUnderflowException
readFloat in class AbstractBytes<Underlying>BufferUnderflowException@NotNull public @NotNull Bytes<Underlying> writeDouble(double d) throws BufferOverflowException
writeDouble in interface StreamingDataOutput<Bytes<Underlying>>writeDouble in class AbstractBytes<Underlying>BufferOverflowExceptionpublic double readDouble()
throws BufferUnderflowException
readDouble in class AbstractBytes<Underlying>BufferUnderflowException@NotNull public @NotNull Reader reader()
@Nullable public @Nullable Boolean parseBoolean(@NotNull @NotNull StopCharTester tester)
false: f, false, n, no, 0
true: t, true, y, yes, 1
tester - to detect the end of the text.@Nullable public @Nullable Boolean parseBoolean()
@NotNull public @NotNull String parseUtf8(@NotNull @NotNull StopCharTester stopCharTester)
stopCharTester - to check if the end has been reached.@NotNull @Deprecated public @NotNull String parseUTF(@NotNull @NotNull StopCharTester stopCharTester)
public void parseUtf8(@NotNull
@NotNull Appendable buffer,
@NotNull
@NotNull StopCharTester stopCharTester)
throws BufferUnderflowException
buffer - to populatestopCharTester - to check if the end has been reached.BufferUnderflowException@Deprecated public void parseUTF(@NotNull @NotNull Appendable buffer, @NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException
BufferUnderflowExceptionpublic void parseUtf8(@NotNull
@NotNull Appendable buffer,
@NotNull
@NotNull StopCharsTester stopCharsTester)
throws BufferUnderflowException,
net.openhft.chronicle.core.io.IORuntimeException
buffer - to populatestopCharsTester - to check if the end has been reached.BufferUnderflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@Deprecated public void parseUTF(@NotNull @NotNull Appendable buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferUnderflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionpublic void parse8bit(Appendable buffer, @NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException
buffer - to populatestopCharTester - to check if the end has been reached.BufferUnderflowExceptionpublic String parse8bit(@NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException
stopCharTester - to check if the end has been reached.BufferUnderflowExceptionpublic void parse8bit(Appendable buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException
buffer - to populatestopCharsTester - to check if the end has been reached.BufferUnderflowExceptionpublic void parse8bit(Bytes buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException
BufferUnderflowExceptionpublic void parse8bit(StringBuilder buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException
BufferUnderflowExceptionpublic int parseInt()
throws BufferUnderflowException
BufferUnderflowExceptionpublic long parseLong()
throws BufferUnderflowException
BufferUnderflowExceptionpublic float parseFloat()
throws BufferUnderflowException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowExceptionpublic double parseDouble()
throws BufferUnderflowException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowExceptionpublic long parseLongDecimal()
throws BufferUnderflowException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowExceptionpublic boolean skipTo(@NotNull
@NotNull StopCharTester tester)
tester - to stop at@NotNull public @NotNull BigDecimal parseBigDecimal()
public long writeRemaining()
public long addressForRead(long offset,
int buffer)
throws UnsupportedOperationException,
BufferUnderflowException
public ByteOrder byteOrder()
public boolean compareAndSwapFloat(long offset,
float expected,
float value)
throws BufferOverflowException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionpublic boolean compareAndSwapDouble(long offset,
double expected,
double value)
throws BufferOverflowException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionCopyright © 2020. All rights reserved.