public class UncheckedBytes<Underlying> extends AbstractBytes<Underlying>
bytesStore, readPosition, writeLimit, writePositionMAX_CAPACITYcharToString| Constructor and Description |
|---|
UncheckedBytes(Bytes underlyingBytes) |
| Modifier and Type | Method and Description |
|---|---|
Bytes<Underlying> |
append8bit(CharSequence cs)
Append a String to the Bytes in ISO-8859-1
|
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.
|
BytesStore<Bytes<Underlying>,Underlying> |
copy() |
boolean |
isElastic() |
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 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 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.
|
protected long |
prewriteOffsetPositionMoved(long subtracting) |
void |
rawCopy(BytesStore bytes,
long offset,
long length) |
default Reader |
reader()
Access these bytes as an ISO-8859-1 encoded Reader
|
Bytes<Underlying> |
readLimit(long limit) |
protected long |
readOffsetPositionMoved(long adding) |
Bytes<Underlying> |
readPosition(long position) |
default long |
readRemaining() |
Bytes<Underlying> |
readSkip(long bytesToSkip)
Skip a number of bytes by moving the readPosition.
|
default boolean |
skipTo(StopCharTester tester)
Skip text until a terminating character is reached.
|
Bytes<Underlying> |
unchecked(boolean unchecked)
Return a Bytes which is optionally unchecked.
|
Bytes<Underlying> |
write(BytesStore bytes,
long offset,
long length) |
Bytes<Underlying> |
writeLimit(long limit) |
protected long |
writeOffsetPositionMoved(long adding) |
Bytes<Underlying> |
writePosition(long position) |
default long |
writeRemaining() |
Bytes<Underlying> |
writeSkip(long bytesToSkip)
Skip a number of bytes by moving the readPosition.
|
address, bytesStore, capacity, clear, clearAndPad, compareAndSwapInt, compareAndSwapLong, equals, equalsBytes, hashCode, nativeRead, nativeRead, nativeWrite, nativeWrite, peekUnsignedByte, prewrite, prewriteByte, prewriteInt, prewriteLong, prewriteShort, readByte, readByte, readDouble, readDouble, readFloat, readFloat, readInt, readInt, readLimit, readLong, readLong, readPosition, readShort, readShort, readUnsignedByte, readVolatileInt, readVolatileLong, realCapacity, refCount, release, reserve, start, toString, underlyingObject, write, write, write, write, write, writeByte, writeByte, writeDouble, writeDouble, writeFloat, writeFloat, writeInt, writeInt, writeLimit, writeLong, writeLong, writeOrderedInt, writeOrderedInt, writeOrderedLong, writeOrderedLong, writePosition, writeShort, writeShort, writeVolatileByte, writeVolatileInt, writeVolatileLong, writeVolatileShortclone, finalize, getClass, notify, notifyAll, wait, wait, waitallocateDirect, allocateDirect, allocateElasticDirect, allocateElasticDirect, bytesForRead, elasticByteBuffer, elasticByteBuffer, empty, ensureCapacity, expect, expect, from, isClear, isEqual, safeLimit, toHexString, toHexString, toHexString, toString, toString, toString, wrapForRead, wrapForRead, wrapForRead, wrapForWrite, wrapForWriteaddAndGetByteNotAtomic, addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetLongNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, addAndGetUnsignedIntNotAtomic, addAndGetUnsignedShortNotAtomic, byteCheckSum, bytesForWrite, charAt, contentEquals, copyTo, endsWith, equalBytes, inside, length, longCheckSum, nativePointer, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, wrap, wrap, zeroOutaddAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, compareUtf8, copyTo, createCharToString, findByte, parseLong, printable, readBoolean, readIncompleteLong, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileByte, readVolatileDouble, readVolatileFloat, readVolatileInt, readVolatileLong, readVolatileShort, subBytesappend, write, write, writeBoolean, writeByte, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloatchars, codePointscopyTo, inputStream, parseUTF, parseUtf8, parseWithLength, read, read, read, read, read8bit, read8bit, read8bit, read8bit, readBoolean, readEnum, readStopBit, readStopBitDouble, readUnsignedInt, readUnsignedShort, readUtf8, readUtf8, readUTFΔ, readUTFΔ, readWithLength, toByteArrayappend, append, append, append, append, append, append8bit, appendDateMillis, appendTimeMillis, writerappendUtf8, appendUtf8, appendUtf8, appendUtf8, copyFrom, outputStream, write, write, write, write, write8bit, write8bit, write8bit, write8bit, writeBoolean, writeEnum, writeStopBit, writeStopBit, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUTFΔclose, release, releaseAll, tryReserveprependpublic UncheckedBytes(@NotNull
Bytes underlyingBytes)
throws IllegalStateException
IllegalStateException@NotNull public Bytes<Underlying> unchecked(boolean unchecked)
Bytesunchecked - if true, minimal bounds checks will be performed.@NotNull public Bytes<Underlying> readPosition(long position)
readPosition in interface StreamingDataInput<Bytes<Underlying>>readPosition in class AbstractBytes<Underlying>@NotNull public Bytes<Underlying> readLimit(long limit)
readLimit in interface StreamingDataInput<Bytes<Underlying>>readLimit in class AbstractBytes<Underlying>@NotNull public Bytes<Underlying> writePosition(long position)
writePosition in interface StreamingDataOutput<Bytes<Underlying>>writePosition in class AbstractBytes<Underlying>@NotNull public Bytes<Underlying> readSkip(long bytesToSkip)
StreamingDataInputreadSkip in interface StreamingDataInput<Bytes<Underlying>>readSkip in class AbstractBytes<Underlying>bytesToSkip - bytes to skip.@NotNull public Bytes<Underlying> writeSkip(long bytesToSkip)
StreamingDataOutputwriteSkip in interface StreamingDataOutput<Bytes<Underlying>>writeSkip in class AbstractBytes<Underlying>bytesToSkip - bytes to skip.@NotNull public Bytes<Underlying> writeLimit(long limit)
writeLimit in interface StreamingDataOutput<Bytes<Underlying>>writeLimit in class AbstractBytes<Underlying>@NotNull public BytesStore<Bytes<Underlying>,Underlying> copy()
public boolean isElastic()
protected long readOffsetPositionMoved(long adding)
readOffsetPositionMoved in class AbstractBytes<Underlying>protected long writeOffsetPositionMoved(long adding)
writeOffsetPositionMoved in class AbstractBytes<Underlying>protected long prewriteOffsetPositionMoved(long subtracting)
throws BufferOverflowException,
IORuntimeException
prewriteOffsetPositionMoved in class AbstractBytes<Underlying>BufferOverflowExceptionIORuntimeException@NotNull public Bytes<Underlying> write(@NotNull BytesStore bytes, long offset, long length) throws IORuntimeException, BufferOverflowException, IllegalArgumentException
@NotNull public Bytes<Underlying> append8bit(@NotNull CharSequence cs) throws BufferOverflowException, BufferUnderflowException, IORuntimeException
ByteStringAppendercs - to writeBufferOverflowException - If the string as too large to write in the capacity availableBufferUnderflowException - if the capacity of the underlying buffer was exceededIORuntimeException - if an error occurred while attempting to resize the underlying bufferpublic void rawCopy(@NotNull
BytesStore bytes,
long offset,
long length)
throws IORuntimeException,
BufferOverflowException,
IllegalArgumentException
public Reader reader()
public 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 public String parseUtf8(@NotNull StopCharTester stopCharTester)
stopCharTester - to check if the end has been reached.@Deprecated public String parseUTF(@NotNull StopCharTester stopCharTester)
public void parseUtf8(@NotNull
Appendable buffer,
@NotNull
StopCharTester stopCharTester)
buffer - to populatestopCharTester - to check if the end has been reached.@Deprecated public void parseUTF(@NotNull Appendable buffer, @NotNull StopCharTester stopCharTester)
public void parseUtf8(@NotNull
Appendable buffer,
@NotNull
StopCharsTester stopCharsTester)
throws BufferUnderflowException,
BufferOverflowException,
IORuntimeException
buffer - to populatestopCharsTester - to check if the end has been reached.BufferUnderflowExceptionBufferOverflowExceptionIORuntimeException@Deprecated public void parseUTF(@NotNull Appendable buffer, @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, BufferOverflowException, IORuntimeException
public void parse8bit(Appendable buffer, @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, BufferOverflowException, IORuntimeException
buffer - to populatestopCharTester - to check if the end has been reached.BufferUnderflowExceptionBufferOverflowExceptionIORuntimeExceptionpublic void parse8bit(Appendable buffer, @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, BufferOverflowException, IORuntimeException
buffer - to populatestopCharsTester - to check if the end has been reached.BufferUnderflowExceptionBufferOverflowExceptionIORuntimeExceptionpublic long parseLong()
throws BufferUnderflowException,
IORuntimeException
BufferUnderflowExceptionIORuntimeExceptionpublic double parseDouble()
throws BufferUnderflowException,
IORuntimeException
BufferUnderflowExceptionIORuntimeExceptionpublic boolean skipTo(@NotNull
StopCharTester tester)
throws IORuntimeException
tester - to stop atIORuntimeExceptionpublic long readRemaining()
public long writeRemaining()
public ByteOrder byteOrder()
public boolean compareAndSwapFloat(long offset,
float expected,
float value)
throws BufferOverflowException,
IllegalArgumentException,
IORuntimeException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionIllegalArgumentExceptionIORuntimeExceptionpublic boolean compareAndSwapDouble(long offset,
double expected,
double value)
throws BufferOverflowException,
IllegalArgumentException,
IORuntimeException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionIllegalArgumentExceptionIORuntimeExceptionCopyright © 2015. All rights reserved.