U - the type of the underlying object representationpublic class VanillaBytes<U> extends AbstractBytes<U> implements Byteable<Bytes<U>,U>, Comparable<CharSequence>
bytesStore, DISABLE_THREAD_SAFETY, isPresent, readPosition, writeLimitreferenceCounted, WARN_COUNT, WARN_NSDEFAULT_BYTE_BUFFER_CAPACITY, MAX_CAPACITY, MAX_HEAP_CAPACITYcharToStringJAVA9_STRING_CODER_LATIN, JAVA9_STRING_CODER_UTF16| Modifier | Constructor and Description |
|---|---|
protected |
VanillaBytes(@NotNull BytesStore bytesStore)
Constructor for creating an instance of VanillaBytes with the given BytesStore,
using its write position and write limit.
|
protected |
VanillaBytes(@NotNull BytesStore bytesStore,
long writePosition,
long writeLimit)
Constructor for creating an instance of VanillaBytes with the given BytesStore,
write position, and write limit.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull VanillaBytes |
append(@NotNull CharSequence str,
int start,
int end)
Appends a portion of a string to the Bytes in UTF-8.
|
@NotNull Bytes<U> |
append8bit(@NotNull BytesStore bs)
Appends the ISO-8859-1 representation of the specified BytesStore.
|
@NotNull Bytes<U> |
append8bit(@NotNull CharSequence cs)
Appends a String to the Bytes in ISO-8859-1.
|
@NotNull Bytes<U> |
append8bit(@NotNull String cs)
Appends the ISO-8859-1 representation of the specified String.
|
protected @NotNull Bytes<U> |
append8bit0(@NotNull CharSequence cs) |
@NotNull Bytes<U> |
appendUtf8(char[] chars,
int offset,
int length)
Appends a UTF-8 encoded CharSequence to this output stream from a specific offset and length.
|
@NotNull VanillaBytes |
appendUtf8(@NotNull CharSequence str)
Appends a UTF-8 encoded CharSequence to this output stream.
|
int |
byteCheckSum(int start,
int end)
Returns the bytes sum between the specified indexes; start (inclusive) and end (exclusive).
|
@NotNull Bytes<U> |
bytesForRead()
Creates and returns a new slice of this Bytes object with its start position set to the current
read position and its capacity determined by the current limit.
|
void |
bytesStore(@NotNull BytesStore<Bytes<U>,U> byteStore,
long offset,
long length)
Sets the reference to a data type that points to the underlying ByteStore.
|
int |
compareTo(@NotNull CharSequence cs) |
@NotNull BytesStore<Bytes<U>,U> |
copy()
Creates and returns a deep copy of this Bytes object, including the data between
RandomCommon.readPosition() and RandomCommon.readLimit(). |
boolean |
equalBytes(@NotNull BytesStore bytesStore,
long length)
Returns if a portion of a specified BytesStore matches this BytesStore.
|
long |
findByte(byte stopByte)
Finds the first occurrence of the specified byte in this byte sequence.
|
boolean |
isElastic()
Checks if this Bytes object is elastic, meaning it can dynamically resize when more data is written
than its current
Bytes.realCapacity(). |
boolean |
isEqual(@Nullable String other)
Compares the contents of this Bytes object with the provided
other string for equality. |
long |
maxSize()
Returns the maximum size in bytes that this reference can point to.
|
long |
offset()
Returns the offset within the ByteStore to which this object currently points.
|
protected void |
optimisedWrite(@NotNull RandomDataInput bytes,
long offset,
long length) |
long |
parseLong()
Parses text from the byte string as a long integer.
|
int |
read(byte[] bytes)
Reads the input stream into the provided byte array.
|
void |
read8Bit(char[] chars,
int length) |
long |
readVolatileLong(long offset)
Reads a volatile 64-bit long value from a specified offset.
|
long |
realCapacity()
Returns the actual capacity of the ByteStore before any resizing occurs.
|
@NotNull String |
toString() |
protected @NotNull String |
toString0() |
ByteBuffer |
toTemporaryDirectByteBuffer()
Converts the byte sequence into a direct byte buffer.
|
static @NotNull VanillaBytes<Void> |
vanillaBytes()
Factory method for creating an instance of VanillaBytes with no initial ByteStore.
|
static <U> VanillaBytes<U> |
wrap(BytesStore<?,U> bytesStore)
Factory method for creating an instance of VanillaBytes that wraps the provided BytesStore.
|
@NotNull Bytes<U> |
write(@NotNull BytesStore bytes,
long offset,
long length)
Writes the specified number of bytes from the provided
BytesStore into the output stream,
starting from the given read offset. |
void |
write(long position,
@NotNull CharSequence str,
int offset,
int length) |
@NotNull Bytes<U> |
write(@NotNull RandomDataInput bytes,
long offset,
long length)
Writes the specified number of bytes from the provided
RandomDataInput object into the output stream,
starting from the given read offset. |
acquireUncheckedInput, addressForRead, addressForWrite, addressForWritePosition, append, append, append, append, append, append, appendAndReturnLength, byteCheckSum, byteCheckSum, bytesStore, bytesStore, canReadDirect, canWriteDirect, capacity, clear, clearAndPad, compact, compareAndSwapInt, compareAndSwapLong, copyTo, decimaliser, decimaliser, equals, fpAppend0, fpAppend0, hashCode, internalNumberBuffer, isDirectMemory, isImmutableEmptyByteStore, lastDecimalPlaces, lastDecimalPlaces, lastNumberHadDigits, lastNumberHadDigits, length, lenient, lenient, move, nativeRead, nativeWrite, peekUnsignedByte, peekUnsignedByte, performRelease, prewrite, prewrite, prewriteByte, prewriteInt, prewriteLong, prewriteOffsetPositionMoved, prewriteShort, read, read, readByte, readByte, readCheckOffset, readDouble, readDouble, readFloat, readFloat, readInt, readInt, readLimit, readLimit, readLong, readLong, readOffsetPositionMoved, readPosition, readPosition, readPositionForHeader, readShort, readShort, readSkip, readUnsignedByte, readUnsignedByte, readVolatileByte, readVolatileInt, readVolatileInt, readVolatileLong, readVolatileShort, safeCopySize, start, startsWith, testAndSetInt, uncheckedReadSkipBackOne, uncheckedReadSkipOne, uncheckedReadUnsignedByte, uncheckedWritePosition, underlyingObject, write, write, write, write, write, write, write8bit, write8bit, write8bit, write8bit, writeBoolean, writeByte, writeByte, writeCheckOffset, writeDouble, writeDouble, writeDoubleAndInt, writeFloat, writeFloat, writeInt, writeInt, writeIntAdv, writeLimit, writeLimit, writeLong, writeLong, writeLongAdv, writeOffsetPositionMoved, writeOffsetPositionMoved, writeOrderedInt, writeOrderedInt, writeOrderedLong, writeOrderedLong, writePosition, writePosition, writeShort, writeShort, writeSkip, writeSome, writeVolatileByte, writeVolatileInt, writeVolatileLong, writeVolatileShortaddReferenceChangeListener, assertReferencesReleased, backgroundPerformRelease, canReleaseInBackground, clearUsedByThread, createdHere, disableReferenceTracing, enableReferenceTracing, refCount, referenceCountedUnmonitored, referenceId, release, releaseLast, removeReferenceChangeListener, reserve, reservedBy, reserveTransfer, singleThreadedCheckDisabled, singleThreadedCheckReset, threadSafetyCheck, throwExceptionIfNotReleased, throwExceptionIfReleased, tryReserve, unmonitor, warnAndReleaseIfNotReleasedclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddress, bytesStore, lock, tryLockallocateDirect, allocateDirect, allocateElasticDirect, allocateElasticDirect, allocateElasticOnHeap, allocateElasticOnHeap, bytesForWrite, copyTo, copyTo, directFrom, elasticByteBuffer, elasticByteBuffer, elasticByteBuffer, elasticHeapByteBuffer, elasticHeapByteBuffer, empty, ensureCapacity, forFieldGroup, from, from, fromDirect, fromHexString, indexOf, indexOf, isClear, readMarshallableLength16, readWithLength, readWrite, safeLimit, sharedMemory, toHexString, toHexString, toHexString, toString, toString, toString, unchecked, unchecked, unwrite, valueOf, wrapForRead, wrapForRead, wrapForWrite, wrapForWrite, write, writeMarshallableLength16addAndGetDouble, addAndGetDoubleNotAtomic, addAndGetFloat, addAndGetFloatNotAtomic, addAndGetInt, addAndGetIntNotAtomic, addAndGetLong, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, charAt, cipher, cipher, compareAndSwapDouble, compareAndSwapFloat, contentEquals, elasticByteBuffer, endsWith, follow, forFields, from, hash, inside, inside, isEmpty, isEqual, lazyNativeBytesStoreWithFixedCapacity, nativePointer, nativeStore, nativeStoreFrom, nativeStoreWithFixedCapacity, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, wrap, writeMaxInt, writeMaxLong, zeroOutappend, append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloatchars, codePointsbytesMethodReader, bytesMethodReaderBuilder, readObjectcanReadDirect, compareUtf8, copyTo, createCharToString, fastHash, parseLong, peekVolatileInt, printable, readBoolean, readIncompleteLong, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileDouble, readVolatileFloat, subBytes, toByteArrayparse8bit, parse8bit, parse8bit, parse8bit, parse8bit, parseBigDecimal, parseBoolean, parseBoolean, parseDouble, parseFlexibleLong, parseFloat, parseInt, parseLongDecimal, parseUtf8, parseUtf8, parseUtf8, reader, skipToinputStream, parseHexLong, parseUtf8, parseUtf8, rawReadByte, rawReadInt, rawReadLong, read, read, read, read, read8bit, read8bit, read8bit, readBigDecimal, readBigInteger, readBoolean, readChar, readEnum, readHistogram, readIncompleteLong, readInt24, readLimitToCapacity, readPositionRemaining, readPositionUnlimited, readStopBit, readStopBitChar, readStopBitDecimal, readStopBitDouble, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8, readUtf8, readUtf8, readWithLength, readWithLength, readWithLength0, unsafeRead, unsafeReadObject, unsafeReadObjectbytesMethodWriter, writeObjectappend, append, append, append, append8bit, append8bit, appendBase, appendBase16, appendBase16, appendDateMillis, appendDecimal, appendTimeMillis, writerappendUtf8, appendUtf8, appendUtf8, appendUtf8, copyFrom, outputStream, rawWriteByte, rawWriteInt, rawWriteLong, unsafeWrite, unsafeWriteObject, unsafeWriteObject, write, write, write, write8bit, write8bit, write8bit, writeBigDecimal, writeBigInteger, writeChar, writeEnum, writeHistogram, writeInt24, writePositionForHeader, writePositionRemaining, writeSome, writeStopBit, writeStopBit, writeStopBit, writeStopBitDecimal, writeUnsignedByte, writeUnsignedInt, writeUnsignedInt24, writeUnsignedShort, writeUtf8, writeUtf8, writeWithLengthprependadjustHexDumpIndentation, retainedHexDumpDescription, writeHexDumpDescriptionprotected VanillaBytes(@NotNull
@NotNull BytesStore bytesStore)
throws net.openhft.chronicle.core.io.ClosedIllegalStateException,
IllegalArgumentException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
bytesStore - the BytesStore to be wrapped by the VanillaBytes.IllegalArgumentException - If the write limit of bytesStore is negative.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe wayprotected VanillaBytes(@NotNull
@NotNull BytesStore bytesStore,
long writePosition,
long writeLimit)
throws net.openhft.chronicle.core.io.ClosedIllegalStateException,
IllegalArgumentException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
bytesStore - the BytesStore to be wrapped by the VanillaBytes.writePosition - the position at which the next write will occur.writeLimit - the maximum limit up to which writing can occur.IllegalArgumentException - If the write limit is negative.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe waypublic static <U> VanillaBytes<U> wrap(BytesStore<?,U> bytesStore) throws net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
bytesStore - the BytesStore to be wrapped by the VanillaBytes.IllegalArgumentException - If the write limit is negative.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way@NotNull public static @NotNull VanillaBytes<Void> vanillaBytes()
public long readVolatileLong(long offset)
throws BufferUnderflowException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
RandomDataInputreadVolatileLong in interface RandomDataInputreadVolatileLong in class AbstractBytes<U>offset - the location from where the long value is read.BufferUnderflowException - If the offset is beyond the limits of the byte source.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe waypublic void bytesStore(@NotNull
@NotNull BytesStore<Bytes<U>,U> byteStore,
long offset,
long length)
throws net.openhft.chronicle.core.io.ClosedIllegalStateException,
IllegalArgumentException,
BufferUnderflowException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
ByteablebytesStore in interface Byteable<Bytes<U>,U>byteStore - the fixed-point ByteStoreoffset - the offset within the ByteStore, indicating the starting point of the memory sectionlength - the length of the memory section within the ByteStorenet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.IllegalArgumentException - If the provided arguments are invalidBufferUnderflowException - If the new memory section starts before the start of the ByteStorenet.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe waypublic long offset()
Byteablepublic long maxSize()
Byteablepublic boolean isElastic()
BytesBytes.realCapacity().
Elastic Bytes objects can automatically grow to accommodate additional data, whereas non-elastic ones have a fixed capacity.
@NotNull public @NotNull Bytes<U> bytesForRead() throws net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
BytesNote that the slice is a subsection of this Bytes object and will not be elastic regardless of the elasticity of the parent Bytes object.
bytesForRead in interface Bytes<U>bytesForRead in interface BytesStore<Bytes<U>,U>net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe waypublic boolean isEqual(@Nullable
@Nullable String other)
Bytesother string for equality.
This method returns true if the contents of this Bytes object is equal to the contents
of the other string. Otherwise, it returns false.
public long realCapacity()
BytesStorerealCapacity in interface Bytes<U>realCapacity in interface BytesStore<Bytes<U>,U>realCapacity in interface RandomDataInputrealCapacity in interface StreamingDataOutput<Bytes<U>>realCapacity in class AbstractBytes<U>public long findByte(byte stopByte)
throws net.openhft.chronicle.core.io.ClosedIllegalStateException
RandomDataInputfindByte in interface RandomDataInputstopByte - the byte to be searched for.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.public long parseLong()
throws BufferUnderflowException,
net.openhft.chronicle.core.io.ClosedIllegalStateException
ByteStringParserparseLong in interface ByteStringParser<Bytes<U>>BufferUnderflowException - If there is insufficient data.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.@NotNull public @NotNull BytesStore<Bytes<U>,U> copy() throws net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
BytesRandomCommon.readPosition() and RandomCommon.readLimit().
The copy will have its own separate storage and state, and modifications to the copy will not affect the original Bytes object, and vice versa.
copy in interface Bytes<U>copy in interface BytesStore<Bytes<U>,U>net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way@NotNull public @NotNull Bytes<U> write(@NotNull @NotNull RandomDataInput bytes, long offset, long length) throws BufferOverflowException, BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, IllegalArgumentException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutputRandomDataInput object into the output stream,
starting from the given read offset.
The position of this output stream is updated accordingly, but the read position of the input data is not changed.write in interface StreamingDataOutput<Bytes<U>>bytes - the RandomDataInput from which data is read.offset - the offset at which reading from the RandomDataInput starts.length - the number of bytes to write.BufferOverflowException - If there is not enough space left in the output stream.BufferUnderflowException - If there is not enough data available in the input.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.IllegalArgumentException - If the readOffset or length are invalid.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe wayprotected void optimisedWrite(@NotNull
@NotNull RandomDataInput bytes,
long offset,
long length)
throws BufferOverflowException,
BufferUnderflowException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
IllegalArgumentException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
BufferOverflowExceptionBufferUnderflowExceptionnet.openhft.chronicle.core.io.ClosedIllegalStateExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.ThreadingIllegalStateExceptionpublic void write(long position,
@NotNull
@NotNull CharSequence str,
int offset,
int length)
throws BufferOverflowException,
IllegalArgumentException,
ArithmeticException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
BufferUnderflowException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
BufferOverflowExceptionIllegalArgumentExceptionArithmeticExceptionnet.openhft.chronicle.core.io.ClosedIllegalStateExceptionBufferUnderflowExceptionnet.openhft.chronicle.core.io.ThreadingIllegalStateException@NotNull public @NotNull VanillaBytes append(@NotNull @NotNull CharSequence str, int start, int end) throws IndexOutOfBoundsException
ByteStringAppenderappend in interface Appendableappend in interface ByteStringAppender<Bytes<U>>str - the CharacterSequence to appendstart - index of the first char inclusiveend - index of the last char exclusiveIndexOutOfBoundsException - If the specified indexes are out of range@NotNull public @NotNull VanillaBytes appendUtf8(@NotNull @NotNull CharSequence str) throws BufferOverflowException
StreamingDataOutputappendUtf8 in interface StreamingDataOutput<Bytes<U>>str - The CharSequence to be appended.BufferOverflowException - If there is not enough space left in the output stream.@NotNull public @NotNull Bytes<U> append8bit(@NotNull @NotNull CharSequence cs) throws BufferOverflowException, BufferUnderflowException, IndexOutOfBoundsException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
ByteStringAppenderappend8bit in interface ByteStringAppender<Bytes<U>>cs - the CharSequence to appendBufferOverflowException - If the string is too large to write in the capacity availableBufferUnderflowException - If the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.IndexOutOfBoundsException@NotNull public @NotNull Bytes<U> append8bit(@NotNull @NotNull BytesStore bs) throws BufferOverflowException, BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
ByteStringAppenderappend8bit in interface ByteStringAppender<Bytes<U>>bs - the BytesStore to appendBufferOverflowException - If the BytesStore is too large to write in the capacity availableBufferUnderflowException - If the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.@NotNull public @NotNull Bytes<U> write(@NotNull @NotNull BytesStore bytes, long offset, long length) throws BufferOverflowException, BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, IllegalArgumentException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutputBytesStore into the output stream,
starting from the given read offset. It ensures that the output stream has enough capacity
to accommodate the incoming bytes. The position of this output stream is updated accordingly,
but the read position of the input data is not changed.write in interface StreamingDataOutput<Bytes<U>>bytes - the BytesStore from which data is read.offset - the offset at which reading from the BytesStore starts.length - the number of bytes to write.BufferOverflowException - If there is not enough space left in the output stream.BufferUnderflowException - If there is not enough data available in the input.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.IllegalArgumentException - If the readOffset or length are invalid.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way@NotNull public @NotNull Bytes<U> append8bit(@NotNull @NotNull String cs) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
ByteStringAppenderappend8bit in interface ByteStringAppender<Bytes<U>>cs - the String to appendBufferOverflowException - If the string is too large to write in the capacity availablenet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.@NotNull public @NotNull String toString()
toString in interface CharSequencetoString in class AbstractBytes<U>@NotNull protected @NotNull String toString0() throws net.openhft.chronicle.core.io.ClosedIllegalStateException
net.openhft.chronicle.core.io.ClosedIllegalStateException@NotNull protected @NotNull Bytes<U> append8bit0(@NotNull @NotNull CharSequence cs) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
BufferOverflowExceptionnet.openhft.chronicle.core.io.ClosedIllegalStateExceptionnet.openhft.chronicle.core.io.ThreadingIllegalStateExceptionpublic boolean equalBytes(@NotNull
@NotNull BytesStore bytesStore,
long length)
throws BufferUnderflowException,
net.openhft.chronicle.core.io.ClosedIllegalStateException
BytesStoreequalBytes in interface BytesStore<Bytes<U>,U>bytesStore - the BytesStore to match againstlength - the length to matchtrue if the bytes up to min(length, this.length(), bytesStore.length()) matched.BufferUnderflowException - If there's not enough data to be movednet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.public void read8Bit(char[] chars,
int length)
throws BufferUnderflowException,
net.openhft.chronicle.core.io.ClosedIllegalStateException
BufferUnderflowExceptionnet.openhft.chronicle.core.io.ClosedIllegalStateExceptionpublic int byteCheckSum(int start,
int end)
throws net.openhft.chronicle.core.io.IORuntimeException,
BufferUnderflowException
AbstractBytesbyteCheckSum in class AbstractBytes<U>start - the index of the first byte to sumend - the index of the last byte to sumBufferUnderflowException - If the specified indexes are outside the limits of the BytesStorenet.openhft.chronicle.core.io.IORuntimeException@NotNull public @NotNull Bytes<U> appendUtf8(char[] chars, int offset, int length) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, BufferUnderflowException, IllegalArgumentException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutputappendUtf8 in interface StreamingDataOutput<Bytes<U>>chars - The CharSequence to be appended.offset - The offset from which to start writing the CharSequence.length - The number of characters from the CharSequence to write.BufferOverflowException - If there is not enough space left in the output stream.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.BufferUnderflowException - If there is not enough data available in the input CharSequence.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe wayIllegalArgumentExceptionpublic ByteBuffer toTemporaryDirectByteBuffer() throws IllegalArgumentException, ArithmeticException, net.openhft.chronicle.core.io.ClosedIllegalStateException
RandomDataInputtoTemporaryDirectByteBuffer in interface RandomDataInputIllegalArgumentException - If the byte sequence cannot be converted into a ByteBuffer.ArithmeticException - If the calculated size of the ByteBuffer is invalid.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.public int read(byte[] bytes)
throws BufferUnderflowException,
net.openhft.chronicle.core.io.ClosedIllegalStateException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataInputread in interface StreamingDataInput<Bytes<U>>bytes - the byte array to fill with the read dataBufferUnderflowException - If there's not enough data to readnet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe waypublic int compareTo(@NotNull
@NotNull CharSequence cs)
compareTo in interface Comparable<CharSequence>Copyright © 2023. All rights reserved.