public class UncheckedBytes<Underlying> extends AbstractBytes<Underlying>
bytesStore, isPresent, readPosition, writeLimit, writePositionDEFAULT_BYTE_BUFFER_CAPACITY, MAX_BYTE_BUFFER_CAPACITY, MAX_CAPACITYcharToStringJAVA9_STRING_CODER_LATIN, JAVA9_STRING_CODER_UTF16| 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
|
BytesStore<Bytes<Underlying>,Underlying> |
copy() |
void |
ensureCapacity(long size)
grow the buffer if the buffer is elastic, if the buffer is not elastic and there is not
enough capacity then this method will throws
BufferOverflowException |
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 void |
parse8bit(Bytes buffer,
StopCharsTester stopCharsTester) |
default String |
parse8bit(StopCharTester stopCharTester)
parse text with ISO-8859-1 decoding as character terminated.
|
default void |
parse8bit(StringBuilder buffer,
StopCharsTester stopCharsTester) |
default BigDecimal |
parseBigDecimal() |
default Boolean |
parseBoolean() |
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 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(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) |
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.
|
boolean |
unchecked() |
Bytes<Underlying> |
unchecked(boolean unchecked)
Return a Bytes which is optionally unchecked.
|
Bytes<Underlying> |
write(BytesStore bytes,
long offset,
long length)
Write all data or fail.
|
Bytes<Underlying> |
writeLimit(long limit) |
protected long |
writeOffsetPositionMoved(long adding,
long advance) |
Bytes<Underlying> |
writePosition(long position) |
Bytes<Underlying> |
writeSkip(long bytesToSkip)
Skip a number of bytes by moving the readPosition.
|
addressForRead, addressForWrite, byteCheckSum, byteCheckSum, byteCheckSum, bytesStore, capacity, 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, prewriteShort, readByte, readByte, readDouble, readDouble, readFloat, readFloat, readInt, readInt, readLimit, readLong, readLong, readPosition, readShort, readShort, readUnsignedByte, readUnsignedByte, readVolatileByte, readVolatileInt, readVolatileInt, readVolatileLong, readVolatileLong, readVolatileShort, realCapacity, refCount, release, reserve, safeCopySize, start, testAndSetInt, toString, tryReserve, uncheckedReadSkipBackOne, uncheckedReadSkipOne, uncheckedReadUnsignedByte, underlyingObject, write, write, write, write, writeByte, writeByte, writeCheckOffset0, writeDouble, writeDouble, writeDoubleAndInt, writeFloat, writeFloat, writeInt, writeInt, writeIntAdv, writeLimit, writeLong, writeLong, writeLongAdv, writeOffsetPositionMoved, writeOrderedInt, writeOrderedInt, writeOrderedLong, writeOrderedLong, writePosition, writeShort, writeShort, writeSome, writeVolatileByte, writeVolatileInt, writeVolatileLong, writeVolatileShortclone, finalize, getClass, notify, notifyAll, wait, wait, waitallocateDirect, allocateDirect, allocateElasticDirect, allocateElasticDirect, bytesForRead, copyTo, copyTo, elasticByteBuffer, elasticByteBuffer, elasticByteBuffer, elasticHeapByteBuffer, from, fromHexString, fromString, indexOf, indexOf, indexOf, indexOf, isClear, isEqual, readBigDecimal, readBigInteger, readMarshallableLength16, readWithLength, readWrite, safeLimit, sharedMemory, toHexString, toHexString, toHexString, toString, toString, toString, unwrite, wrapForRead, wrapForRead, wrapForWrite, wrapForWrite, writeMarshallableLength16addAndGetByteNotAtomic, addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetLongNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, addAndGetUnsignedIntNotAtomic, addAndGetUnsignedShortNotAtomic, bytesForWrite, charAt, cipher, cipher, contentEquals, empty, endsWith, equalBytes, inside, inside, isEmpty, length, longCheckSum, nativePointer, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, wrap, writeMaxLong, zeroOutaddAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, compareUtf8, copyTo, copyTo, createCharToString, fastHash, findByte, parseLong, peekVolatileInt, printable, read, readBoolean, readIncompleteLong, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileDouble, readVolatileFloat, subBytes, toByteArray, toTemporaryDirectByteBufferappend, append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloatchars, codePointsbytesMethodReader, bytesMethodReaderBuilder, readObjectinputStream, parseHexLong, parseUTF, parseUtf8, read, read, read, read, read, read8bit, read8bit, read8bit, read8bit, readBoolean, readEnum, readHistogram, readInt24, readPositionRemaining, readPositionUnlimited, readStopBit, readStopBitChar, readStopBitDecimal, readStopBitDouble, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8, readUTFΔ, readUTFΔ, readWithLength, readWithLength, readWithLength0bytesMethodWriter, bytesMethodWriterBuilder, writeObjectappend, append, append, append, append, append, append, append, append, append, append8bit, append8bit, appendBase, appendBase16, appendBase16, appendDateMillis, appendDecimal, appendTimeMillis, writeralignBy, appendUtf8, appendUtf8, appendUtf8, appendUtf8, appendUtf8, appendUtf8, copyFrom, outputStream, write, write, write, write, write8bit, write8bit, write8bit, write8bit, writeBigDecimal, writeBigInteger, writeBoolean, writeEnum, writeHistogram, writeInt24, writePositionRemaining, writeSome, writeStopBit, writeStopBit, writeStopBit, writeStopBitDecimal, writeUnsignedByte, writeUnsignedInt, writeUnsignedInt24, writeUnsignedShort, writeUtf8, writeUtf8, writeUTFΔ, writeWithLengthprependcomment, indent, retainsCommentspublic UncheckedBytes(@NotNull
Bytes underlyingBytes)
throws IllegalStateException
IllegalStateExceptionpublic void ensureCapacity(long size)
throws IllegalArgumentException
BytesBufferOverflowExceptionsize - the capacity that you requiredIllegalArgumentException - if the buffer is not elastic and there is not enough space@NotNull public Bytes<Underlying> unchecked(boolean unchecked)
Bytesthis is elastic.unchecked - if true, minimal bounds checks will be performed.public boolean unchecked()
@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,
long advance)
writeOffsetPositionMoved in class AbstractBytes<Underlying>protected long prewriteOffsetPositionMoved(long subtracting)
throws BufferOverflowException
prewriteOffsetPositionMoved in class AbstractBytes<Underlying>BufferOverflowException@NotNull public Bytes<Underlying> write(@NotNull BytesStore bytes, long offset, long length) throws BufferOverflowException, IllegalArgumentException
StreamingDataOutput@NotNull public Bytes<Underlying> append8bit(@NotNull CharSequence cs) throws BufferOverflowException, BufferUnderflowException
ByteStringAppendercs - to writeBufferOverflowException - If the string as too large to write in the capacity availableBufferUnderflowException - if the capacity of the underlying buffer was exceededpublic void rawCopy(@NotNull
BytesStore bytes,
long offset,
long length)
throws BufferOverflowException,
IllegalArgumentException
@NotNull public Reader reader()
@Nullable 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.@Nullable public Boolean parseBoolean()
@NotNull public String parseUtf8(@NotNull StopCharTester stopCharTester)
stopCharTester - to check if the end has been reached.@NotNull @Deprecated public String parseUTF(@NotNull StopCharTester stopCharTester)
public void parseUtf8(@NotNull
Appendable buffer,
@NotNull
StopCharTester stopCharTester)
throws BufferUnderflowException
buffer - to populatestopCharTester - to check if the end has been reached.BufferUnderflowException@Deprecated public void parseUTF(@NotNull Appendable buffer, @NotNull StopCharTester stopCharTester) throws BufferUnderflowException
BufferUnderflowExceptionpublic 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.BufferUnderflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@Deprecated public void parseUTF(@NotNull Appendable buffer, @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferUnderflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionpublic void parse8bit(Appendable buffer, @NotNull StopCharTester stopCharTester) throws BufferUnderflowException
buffer - to populatestopCharTester - to check if the end has been reached.BufferUnderflowExceptionpublic String parse8bit(@NotNull StopCharTester stopCharTester) throws BufferUnderflowException
stopCharTester - to check if the end has been reached.BufferUnderflowExceptionpublic void parse8bit(Appendable buffer, @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException
buffer - to populatestopCharsTester - to check if the end has been reached.BufferUnderflowExceptionpublic void parse8bit(Bytes buffer, @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException
BufferUnderflowExceptionpublic void parse8bit(StringBuilder buffer, @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
StopCharTester tester)
tester - to stop at@NotNull public BigDecimal parseBigDecimal()
Copyright © 2018. All rights reserved.