public class HexDumpBytes extends Object implements Bytes<Void>
DEFAULT_BYTE_BUFFER_CAPACITY, MAX_BYTE_BUFFER_CAPACITY, MAX_CAPACITY, MAX_HEAP_CAPACITY
charToString
JAVA9_STRING_CODER_LATIN, JAVA9_STRING_CODER_UTF16
Constructor and Description |
---|
HexDumpBytes() |
Modifier and Type | Method and Description |
---|---|
long |
addressForRead(long offset)
Obtain the underlying addressForRead.
|
default long |
addressForRead(long offset,
int buffer) |
long |
addressForWrite(long offset)
Obtain the underlying addressForRead.
|
long |
addressForWritePosition() |
default ByteOrder |
byteOrder() |
@NotNull BytesStore |
bytesStore() |
long |
capacity() |
@NotNull Bytes |
clear()
Set the readPosition= writePosition = start, writeLimit = capacity
|
@NotNull Bytes<Void> |
clearAndPad(long length)
Clear a buffer, with a given padding to allow for prepending later.
|
Bytes<Void> |
comment(CharSequence comment)
Add comment as approriate for the toHexString format
|
@NotNull Bytes |
compact()
Compact these Bytes by moving the readPosition to the start.
|
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.
|
BytesStore |
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 |
equals(Object obj) |
static HexDumpBytes |
fromText(CharSequence text) |
static HexDumpBytes |
fromText(Reader reader) |
int |
hashCode() |
BytesOut |
indent(int n)
Adjust the indent for nested data
|
boolean |
isDirectMemory() |
boolean |
isElastic()
Returns if this Bytes is elastic.
|
int |
lastDecimalPlaces() |
void |
lastDecimalPlaces(int lastDecimalPlaces)
Store the last number of decimal places.
|
boolean |
lenient() |
void |
lenient(boolean lenient)
When there is no more data to read, return zero, false and empty string.
|
void |
move(long from,
long to,
long length) |
void |
nativeRead(long position,
long address,
long size)
expert level method for copying data to native memory.
|
void |
nativeWrite(long address,
long position,
long size)
expert level method to copy data from native memory into the BytesStore
|
int |
numberWrap() |
HexDumpBytes |
numberWrap(int numberWrap) |
HexDumpBytes |
offsetFormat(OffsetFormat offsetFormat) |
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.
|
int |
peekUnsignedByte() |
int |
peekUnsignedByte(long offset)
Read an unsigned byte at an offset, or -1
|
@NotNull Bytes<Void> |
prewrite(byte[] bytes)
Write backward in binary a byte
|
@NotNull Bytes<Void> |
prewrite(BytesStore bytes)
Write backward in binary a byte
|
@NotNull Bytes<Void> |
prewriteByte(byte b)
Write backward in binary a byte
|
@NotNull Bytes<Void> |
prewriteInt(int i)
Write backward in binary a 4 byte int
|
@NotNull Bytes<Void> |
prewriteLong(long l)
Write backward in binary an 8 byte long
|
@NotNull Bytes<Void> |
prewriteShort(short i)
Write backward in binary a 2 byte int
|
int |
read(@NotNull byte[] bytes) |
int |
read(@NotNull byte[] bytes,
int off,
int len) |
void |
read(@NotNull ByteBuffer buffer) |
void |
read(@NotNull Bytes bytes,
int length) |
int |
read(@NotNull char[] bytes,
int off,
int len) |
@Nullable String |
read8bit() |
<ACS extends Appendable & CharSequence> |
read8bit(ACS sb) |
boolean |
read8bit(@NotNull Bytes b) |
boolean |
read8bit(@NotNull StringBuilder sb) |
@NotNull BigDecimal |
readBigDecimal() |
@NotNull BigInteger |
readBigInteger() |
boolean |
readBoolean() |
byte |
readByte() |
byte |
readByte(long offset)
Read byte at an offset
|
double |
readDouble() |
double |
readDouble(long offset)
Read a double at an offset
|
<E extends Enum<E>> |
readEnum(@NotNull Class<E> eClass) |
default @NotNull Reader |
reader()
Access these bytes as an ISO-8859-1 encoded Reader
|
float |
readFloat() |
float |
readFloat(long offset)
Read a float at an offset
|
void |
readHistogram(@NotNull net.openhft.chronicle.core.util.Histogram histogram) |
int |
readInt() |
int |
readInt(long offset)
Read an int at an offset
|
int |
readInt24() |
long |
readLimit() |
@NotNull Bytes<Void> |
readLimit(long limit) |
long |
readLong() |
long |
readLong(long offset)
Read a long at an offset
|
<T extends ReadBytesMarshallable> |
readMarshallableLength16(Class<T> tClass,
T object) |
long |
readPosition()
The read position must be start() <= readPosition() && readPosition() <= readLimit() && readPosition < safeLimit()
|
@NotNull Bytes<Void> |
readPosition(long position) |
@NotNull Bytes<Void> |
readPositionRemaining(long position,
long remaining) |
@NotNull Bytes<Void> |
readPositionUnlimited(long position) |
long |
readRemaining() |
short |
readShort() |
short |
readShort(long offset)
Read a short at an offset
|
@NotNull Bytes<Void> |
readSkip(long bytesToSkip)
Skip a number of bytes by moving the readPosition.
|
long |
readStopBit() |
char |
readStopBitChar() |
double |
readStopBitDecimal() |
double |
readStopBitDouble() |
int |
readUnsignedByte() |
long |
readUnsignedInt() |
int |
readUnsignedInt24() |
int |
readUnsignedShort() |
@Nullable String |
readUtf8()
The same as readUTF() except the length is stop bit encoded.
|
<ACS extends Appendable & CharSequence> |
readUtf8(ACS sb)
The same as readUtf8() except the chars are copied to a truncated StringBuilder.
|
<ACS extends Appendable & CharSequence> |
readUtf8(long offset,
ACS sb)
Truncates
sb (it must be a StringBuilder or Bytes ) and reads a char
sequence from the given offset , encoded as Utf8, into it. |
<ACS extends Appendable & CharSequence> |
readUtf8Limited(long offset,
ACS sb,
int maxUtf8Len)
Truncates
sb (it must be a StringBuilder or Bytes ) and reads a char
sequence from the given offset , encoded as Utf8, into it. |
@Nullable String |
readUtf8Limited(long offset,
int maxUtf8Len)
Reads a char sequence from the given
offset , encoded as Utf8. |
@Nullable String |
readUTFΔ() |
<ACS extends Appendable & CharSequence> |
readUTFΔ(ACS sb) |
byte |
readVolatileByte(long offset)
Read a 8-bit byte from memory with a load barrier.
|
int |
readVolatileInt() |
int |
readVolatileInt(long offset)
Read a 32-bit int from memory with a load barrier.
|
long |
readVolatileLong() |
long |
readVolatileLong(long offset)
Read a 64-bit long from memory with a load barrier.
|
short |
readVolatileShort(long offset)
Read a 16-bit short from memory with a load barrier.
|
void |
readWithLength(Bytes bytes) |
void |
readWithLength(long length,
@NotNull BytesOut<Void> bytesOut) |
void |
readWithLength(long length,
@NotNull net.openhft.chronicle.core.util.ThrowingConsumer<Bytes<Void>,net.openhft.chronicle.core.io.IORuntimeException> bytesConsumer)
Perform a set of actions with a temporary bounds mode.
|
void |
readWithLength0(long length,
@NotNull net.openhft.chronicle.core.util.ThrowingConsumerNonCapturing<Bytes<Void>,net.openhft.chronicle.core.io.IORuntimeException,BytesOut> bytesConsumer,
StringBuilder sb,
BytesOut toBytes)
Perform a set of actions with a temporary bounds mode.
|
long |
realWriteRemaining() |
int |
refCount() |
void |
release(net.openhft.chronicle.core.io.ReferenceOwner owner) |
void |
releaseLast(net.openhft.chronicle.core.io.ReferenceOwner owner) |
void |
reserve(net.openhft.chronicle.core.io.ReferenceOwner owner) |
boolean |
reservedBy(net.openhft.chronicle.core.io.ReferenceOwner owner) |
boolean |
retainsComments()
Do these Bytes support saving comments
|
default boolean |
skipTo(@NotNull StopCharTester tester)
Skip text until a terminating character is reached.
|
default long |
start() |
void |
testAndSetInt(long offset,
int expected,
int value) |
@NotNull String |
toHexString() |
@NotNull String |
toString() |
boolean |
tryReserve(net.openhft.chronicle.core.io.ReferenceOwner owner) |
void |
uncheckedReadSkipBackOne()
Read skip -1 when you are sure this is safe.
|
void |
uncheckedReadSkipOne()
Read skip 1 when you are sure this is safe.
|
int |
uncheckedReadUnsignedByte() |
@Nullable Void |
underlyingObject() |
@NotNull Bytes<Void> |
write(@NotNull byte[] bytes) |
@NotNull Bytes<Void> |
write(byte[] bytes,
int offset,
int length)
Write all data or fail.
|
Bytes<Void> |
write(@NotNull BytesStore bytes)
Writes all the the passed BytesStore or it fails.
|
@NotNull Bytes<Void> |
write(@NotNull BytesStore bytes,
long offset,
long length)
Write all data or fail.
|
@NotNull Bytes<Void> |
write(CharSequence cs) |
@NotNull Bytes<Void> |
write(@NotNull CharSequence s,
int start,
int length) |
Bytes |
write(InputStream inputStream) |
@NotNull Bytes<Void> |
write(long offsetInRDO,
byte[] bytes,
int offset,
int length) |
void |
write(long offsetInRDO,
ByteBuffer bytes,
int offset,
int length) |
@NotNull Bytes<Void> |
write(long writeOffset,
RandomDataInput bytes,
long readOffset,
long length) |
@NotNull Bytes<Void> |
write(@NotNull RandomDataInput bytes)
Write all data or fail.
|
@NotNull Bytes<Void> |
write(@NotNull RandomDataInput bytes,
long offset,
long length)
Write all data or fail.
|
@NotNull Bytes<Void> |
write8bit(@Nullable BytesStore bs) |
@NotNull Bytes<Void> |
write8bit(@Nullable CharSequence cs) |
@NotNull Bytes<Void> |
write8bit(@NotNull CharSequence s,
int start,
int length) |
@NotNull Bytes<Void> |
write8bit(@Nullable String s) |
void |
writeBigDecimal(@NotNull BigDecimal bd) |
void |
writeBigInteger(@NotNull BigInteger bi) |
@NotNull Bytes<Void> |
writeBoolean(boolean flag) |
@NotNull Bytes<Void> |
writeByte(byte i8) |
@NotNull Bytes<Void> |
writeByte(long offset,
byte i8)
Write an unsigned byte at an offset.
|
@NotNull Bytes<Void> |
writeDouble(double d) |
@NotNull Bytes<Void> |
writeDouble(long offset,
double d)
Write a double at an offset.
|
@NotNull Bytes<Void> |
writeDoubleAndInt(double d,
int i) |
<E extends Enum<E>> |
writeEnum(E e) |
@NotNull Bytes<Void> |
writeFloat(float f) |
@NotNull Bytes<Void> |
writeFloat(long offset,
float d)
Write a float at an offset.
|
void |
writeHistogram(@NotNull net.openhft.chronicle.core.util.Histogram histogram) |
@NotNull Bytes<Void> |
writeInt(int i) |
@NotNull Bytes<Void> |
writeInt(long offset,
int i)
Write an int at an offset.
|
@NotNull Bytes<Void> |
writeInt24(int i) |
@NotNull Bytes<Void> |
writeInt24(long offset,
int i) |
@NotNull Bytes<Void> |
writeIntAdv(int i,
int advance) |
long |
writeLimit() |
@NotNull Bytes<Void> |
writeLimit(long limit) |
@NotNull Bytes<Void> |
writeLong(long i64)
Write a long
|
@NotNull Bytes<Void> |
writeLong(long offset,
long i)
Write a long at an offset.
|
@NotNull Bytes<Void> |
writeLongAdv(long i64,
int advance) |
void |
writeMarshallableLength16(WriteBytesMarshallable marshallable) |
@NotNull Bytes<Void> |
writeOrderedInt(int i) |
@NotNull Bytes<Void> |
writeOrderedInt(long offset,
int i)
Perform a non stalling write with a store barrier.
|
@NotNull Bytes<Void> |
writeOrderedLong(long i) |
@NotNull Bytes<Void> |
writeOrderedLong(long offset,
long i)
Perform a non stalling write with a store barrier.
|
long |
writePosition()
For HexDumpBytes it needs to remember the writePosition for the underlying bytes as well as the text hex dump, so it encodes both in one number so you can call writePosition later.
|
@NotNull Bytes<Void> |
writePosition(long position) |
void |
writePositionRemaining(long position,
long length) |
long |
writeRemaining() |
@NotNull Bytes<Void> |
writeShort(long offset,
short i)
Write a short at an offset.
|
@NotNull Bytes<Void> |
writeShort(short i16) |
@NotNull Bytes<Void> |
writeSkip(long bytesToSkip)
Skip a number of bytes by moving the writePosition.
|
@NotNull Bytes<Void> |
writeSome(ByteBuffer buffer) |
@NotNull Bytes<Void> |
writeSome(@NotNull Bytes bytes) |
@NotNull Bytes<Void> |
writeStopBit(char x) |
@NotNull Bytes<Void> |
writeStopBit(double d) |
@NotNull Bytes<Void> |
writeStopBit(long x)
Write a stop bit encoded long
|
@NotNull Bytes<Void> |
writeStopBitDecimal(double d) |
@NotNull Bytes<Void> |
writeUnsignedByte(int i) |
@NotNull Bytes<Void> |
writeUnsignedInt(long i) |
@NotNull Bytes<Void> |
writeUnsignedInt24(int i) |
@NotNull Bytes<Void> |
writeUnsignedShort(int u16) |
@NotNull Bytes<Void> |
writeUtf8(CharSequence cs)
Write the same encoding as
writeUTF with the following changes. |
@NotNull Bytes<Void> |
writeUtf8(String s) |
@NotNull Bytes<Void> |
writeUTFΔ(CharSequence cs) |
@NotNull Bytes<Void> |
writeVolatileByte(long offset,
byte i8) |
@NotNull Bytes<Void> |
writeVolatileInt(long offset,
int i32) |
@NotNull Bytes<Void> |
writeVolatileLong(long offset,
long i64) |
@NotNull Bytes<Void> |
writeVolatileShort(long offset,
short i16) |
void |
writeWithLength(RandomDataInput bytes) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
allocateDirect, allocateDirect, allocateElasticDirect, allocateElasticDirect, allocateElasticOnHeap, allocateElasticOnHeap, bytesForRead, copyTo, copyTo, directFrom, elasticByteBuffer, elasticByteBuffer, elasticByteBuffer, elasticHeapByteBuffer, elasticHeapByteBuffer, from, from, fromHexString, fromString, indexOf, indexOf, indexOf, indexOf, isClear, isEqual, readWrite, realCapacity, safeLimit, sharedMemory, toHexString, toHexString, toString, toString, toString, unchecked, unchecked, unwrite, valueOf, wrapForRead, wrapForRead, wrapForWrite, wrapForWrite
addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, byteCheckSum, byteCheckSum, bytesForWrite, charAt, cipher, cipher, contentEquals, empty, endsWith, equalBytes, from, inside, inside, isEmpty, length, nativePointer, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, wrap, writeMaxInt, writeMaxLong, zeroOut
append, append, write, write, writeBoolean, writeByte, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloat
chars, codePoints
bytesMethodReader, bytesMethodReaderBuilder, readObject
addAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, canReadDirect, compareUtf8, copyTo, copyTo, createCharToString, fastHash, findByte, parseLong, peekVolatileInt, printable, read, readBoolean, readIncompleteLong, readUnsignedByte, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readVolatileDouble, readVolatileFloat, subBytes, toByteArray, toTemporaryDirectByteBuffer
inputStream, parseHexLong, parseUTF, parseUtf8, parseUtf8, rawReadByte, rawReadInt, rawReadLong, read, readChar, readIncompleteLong, readLimitToCapacity, readUtf8, readUtf8, unsafeReadObject, unsafeReadObject
bytesMethodWriter, writeObject
append, append, append, append, append, append, append, append, append, append, append8bit, append8bit, append8bit, append8bit, append8bit, appendBase, appendBase16, appendBase16, appendDateMillis, appendDecimal, appendTimeMillis, writer
alignBy, appendUtf8, appendUtf8, appendUtf8, appendUtf8, appendUtf8, appendUtf8, canWriteDirect, copyFrom, outputStream, rawWriteByte, rawWriteInt, rawWriteLong, unsafeWriteObject, unsafeWriteObject, writeChar
releaseLast, reserveTransfer
referenceId, referenceName, temporary
prepend
public static HexDumpBytes fromText(Reader reader) throws NumberFormatException
NumberFormatException
public static HexDumpBytes fromText(CharSequence text) throws NumberFormatException
NumberFormatException
public HexDumpBytes offsetFormat(OffsetFormat offsetFormat)
public int numberWrap()
public HexDumpBytes numberWrap(int numberWrap)
public long readRemaining()
public long writeRemaining()
public long readLimit()
public long writeLimit()
@NotNull public @NotNull String toHexString()
toHexString
in interface Bytes<Void>
@NotNull public @NotNull String toString()
toString
in interface CharSequence
toString
in class Object
public boolean retainsComments()
BytesComment
retainsComments
in interface BytesComment<BytesOut<Void>>
public Bytes<Void> comment(CharSequence comment) throws IllegalStateException
BytesComment
comment
in interface BytesComment<BytesOut<Void>>
comment
- to add (or ignore)IllegalStateException
public BytesOut indent(int n) throws IllegalStateException
BytesComment
indent
in interface BytesComment<BytesOut<Void>>
n
- +1 indent in, -1 reduce indentingIllegalStateException
public BytesStore copy()
public boolean isElastic()
Bytes
Bytes.realCapacity()
.public void ensureCapacity(long size) throws IllegalArgumentException, IllegalStateException
Bytes
BufferOverflowException
ensureCapacity
in interface Bytes<Void>
size
- the capacity that you requiredIllegalArgumentException
- if the buffer is not elastic and there is not enough spaceIllegalStateException
@NotNull public @NotNull BytesStore bytesStore()
bytesStore
in interface Bytes<Void>
bytesStore
in interface BytesStore<Bytes<Void>,Void>
@NotNull public @NotNull Bytes compact()
Bytes
@NotNull public @NotNull Bytes clear() throws IllegalStateException
StreamingCommon
clear
in interface Bytes<Void>
clear
in interface StreamingCommon<Bytes<Void>>
IllegalStateException
public boolean isDirectMemory()
isDirectMemory
in interface BytesStore<Bytes<Void>,Void>
public long capacity()
capacity
in interface BytesStore<Bytes<Void>,Void>
public long addressForRead(long offset) throws UnsupportedOperationException, IllegalStateException, 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()IllegalStateException
public long addressForWrite(long offset) throws UnsupportedOperationException
offset
- within this buffer. addressForRead(start()) is the actual addressForRead of the first byte.UnsupportedOperationException
- if the underlying buffer is on the heappublic long addressForWritePosition() throws UnsupportedOperationException, BufferOverflowException
public boolean compareAndSwapInt(long offset, int expected, int value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
public void testAndSetInt(long offset, int expected, int value) throws IllegalStateException, BufferOverflowException
public boolean compareAndSwapLong(long offset, long expected, long value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
@Nullable public @Nullable Void underlyingObject()
underlyingObject
in interface BytesStore<Bytes<Void>,Void>
public void move(long from, long to, long length)
move
in interface BytesStore<Bytes<Void>,Void>
public void reserve(net.openhft.chronicle.core.io.ReferenceOwner owner) throws IllegalStateException
reserve
in interface net.openhft.chronicle.core.io.ReferenceCounted
IllegalStateException
public void release(net.openhft.chronicle.core.io.ReferenceOwner owner) throws IllegalStateException
release
in interface net.openhft.chronicle.core.io.ReferenceCounted
IllegalStateException
public void releaseLast(net.openhft.chronicle.core.io.ReferenceOwner owner) throws IllegalStateException
releaseLast
in interface net.openhft.chronicle.core.io.ReferenceCounted
IllegalStateException
public int refCount()
refCount
in interface net.openhft.chronicle.core.io.ReferenceCounted
public boolean tryReserve(net.openhft.chronicle.core.io.ReferenceOwner owner) throws IllegalStateException, IllegalArgumentException
tryReserve
in interface net.openhft.chronicle.core.io.ReferenceCounted
IllegalStateException
IllegalArgumentException
public boolean reservedBy(net.openhft.chronicle.core.io.ReferenceOwner owner) throws IllegalStateException
reservedBy
in interface net.openhft.chronicle.core.io.ReferenceCounted
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeByte(long offset, byte i8) throws BufferOverflowException, IllegalStateException
RandomDataOutput
writeByte
in interface RandomDataOutput<Bytes<Void>>
offset
- to write toi8
- the valueBufferOverflowException
- if the capacity was exceededIllegalStateException
@NotNull public @NotNull Bytes<Void> writeShort(long offset, short i) throws BufferOverflowException, IllegalStateException
RandomDataOutput
writeShort
in interface RandomDataOutput<Bytes<Void>>
offset
- to write toi
- the valueBufferOverflowException
- if the capacity was exceededIllegalStateException
@NotNull public @NotNull Bytes<Void> writeInt24(long offset, int i) throws BufferOverflowException, IllegalStateException
writeInt24
in interface RandomDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeInt(long offset, int i) throws BufferOverflowException, IllegalStateException
RandomDataOutput
writeInt
in interface RandomDataOutput<Bytes<Void>>
offset
- to write toi
- the valueBufferOverflowException
- if the capacity was exceededIllegalStateException
@NotNull public @NotNull Bytes<Void> writeOrderedInt(long offset, int i) throws BufferOverflowException, IllegalStateException
RandomDataOutput
writeOrderedInt
in interface RandomDataOutput<Bytes<Void>>
offset
- to write toi
- value to writeBufferOverflowException
- if the capacity was exceededIllegalStateException
@NotNull public @NotNull Bytes<Void> writeLong(long offset, long i) throws BufferOverflowException, IllegalStateException
RandomDataOutput
writeLong
in interface RandomDataOutput<Bytes<Void>>
offset
- to write toi
- the valueBufferOverflowException
- if the capacity was exceededIllegalStateException
@NotNull public @NotNull Bytes<Void> writeOrderedLong(long offset, long i) throws BufferOverflowException, IllegalStateException
RandomDataOutput
writeOrderedLong
in interface RandomDataOutput<Bytes<Void>>
offset
- to write toi
- value to writeBufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeFloat(long offset, float d) throws BufferOverflowException, IllegalStateException
RandomDataOutput
writeFloat
in interface RandomDataOutput<Bytes<Void>>
offset
- to write tod
- the valueBufferOverflowException
- if the capacity was exceededIllegalStateException
@NotNull public @NotNull Bytes<Void> writeDouble(long offset, double d) throws BufferOverflowException, IllegalStateException
RandomDataOutput
writeDouble
in interface RandomDataOutput<Bytes<Void>>
offset
- to write tod
- the valueBufferOverflowException
- if the capacity was exceededIllegalStateException
@NotNull public @NotNull Bytes<Void> writeVolatileByte(long offset, byte i8) throws BufferOverflowException
writeVolatileByte
in interface RandomDataOutput<Bytes<Void>>
BufferOverflowException
@NotNull public @NotNull Bytes<Void> writeVolatileShort(long offset, short i16) throws BufferOverflowException
writeVolatileShort
in interface RandomDataOutput<Bytes<Void>>
BufferOverflowException
@NotNull public @NotNull Bytes<Void> writeVolatileInt(long offset, int i32) throws BufferOverflowException
writeVolatileInt
in interface RandomDataOutput<Bytes<Void>>
BufferOverflowException
@NotNull public @NotNull Bytes<Void> writeVolatileLong(long offset, long i64) throws BufferOverflowException
writeVolatileLong
in interface RandomDataOutput<Bytes<Void>>
BufferOverflowException
@NotNull public @NotNull Bytes<Void> write(long offsetInRDO, byte[] bytes, int offset, int length)
write
in interface RandomDataOutput<Bytes<Void>>
public void write(long offsetInRDO, ByteBuffer bytes, int offset, int length)
write
in interface RandomDataOutput<Bytes<Void>>
@NotNull public @NotNull Bytes<Void> write(long writeOffset, RandomDataInput bytes, long readOffset, long length)
write
in interface RandomDataOutput<Bytes<Void>>
public void nativeWrite(long address, long position, long size)
RandomDataOutput
nativeWrite
in interface RandomDataOutput<Bytes<Void>>
address
- in native memory to copy fromposition
- in BytesStore to copy tosize
- in bytes@NotNull public @NotNull Bytes<Void> readPosition(long position) throws BufferUnderflowException, IllegalStateException
@NotNull public @NotNull Bytes<Void> readLimit(long limit) throws BufferUnderflowException
BufferUnderflowException
@NotNull public @NotNull Bytes<Void> readSkip(long bytesToSkip) throws BufferUnderflowException, IllegalStateException
StreamingDataInput
bytesToSkip
- bytes to skip.BufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public void uncheckedReadSkipOne()
StreamingDataInput
public void uncheckedReadSkipBackOne()
StreamingDataInput
public long readStopBit() throws net.openhft.chronicle.core.io.IORuntimeException, IllegalStateException, BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
IllegalStateException
BufferUnderflowException
public char readStopBitChar() throws net.openhft.chronicle.core.io.IORuntimeException, IllegalStateException, BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
IllegalStateException
BufferUnderflowException
public double readStopBitDouble() throws IllegalStateException
IllegalStateException
public double readStopBitDecimal() throws IllegalStateException, BufferUnderflowException
public byte readByte() throws IllegalStateException
IllegalStateException
public int readUnsignedByte() throws IllegalStateException
IllegalStateException
public int uncheckedReadUnsignedByte()
public short readShort() throws BufferUnderflowException, IllegalStateException
public int readInt() throws BufferUnderflowException, IllegalStateException
public long readLong() throws BufferUnderflowException, IllegalStateException
public float readFloat() throws BufferUnderflowException, IllegalStateException
public double readDouble() throws BufferUnderflowException, IllegalStateException
public int readVolatileInt() throws BufferUnderflowException, IllegalStateException
public long readVolatileLong() throws BufferUnderflowException, IllegalStateException
public int peekUnsignedByte() throws IllegalStateException
IllegalStateException
public int lastDecimalPlaces()
public void lastDecimalPlaces(int lastDecimalPlaces)
lastDecimalPlaces
- set the number of decimal places if positive, otherwise 0.@NotNull public @NotNull BigDecimal readBigDecimal() throws BufferUnderflowException, ArithmeticException, IllegalStateException
readBigDecimal
in interface Bytes<Void>
BufferUnderflowException
ArithmeticException
IllegalStateException
@NotNull public @NotNull BigInteger readBigInteger() throws BufferUnderflowException, ArithmeticException, IllegalStateException
readBigInteger
in interface Bytes<Void>
BufferUnderflowException
ArithmeticException
IllegalStateException
public void readWithLength(long length, @NotNull @NotNull BytesOut<Void> bytesOut) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException, IllegalStateException, BufferOverflowException
readWithLength
in interface Bytes<Void>
BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
IllegalStateException
BufferOverflowException
public <T extends ReadBytesMarshallable> T readMarshallableLength16(Class<T> tClass, T object) throws BufferUnderflowException, IllegalStateException
readMarshallableLength16
in interface Bytes<Void>
readMarshallableLength16
in interface BytesIn<Void>
BufferUnderflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> readPositionUnlimited(long position) throws BufferUnderflowException, IllegalStateException
@NotNull public @NotNull Bytes<Void> readPositionRemaining(long position, long remaining) throws BufferUnderflowException, IllegalStateException
public void readWithLength0(long length, @NotNull @NotNull net.openhft.chronicle.core.util.ThrowingConsumerNonCapturing<Bytes<Void>,net.openhft.chronicle.core.io.IORuntimeException,BytesOut> bytesConsumer, StringBuilder sb, BytesOut toBytes) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException, IllegalStateException
StreamingDataInput
BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
IllegalStateException
public void readWithLength(long length, @NotNull @NotNull net.openhft.chronicle.core.util.ThrowingConsumer<Bytes<Void>,net.openhft.chronicle.core.io.IORuntimeException> bytesConsumer) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException, IllegalStateException
StreamingDataInput
BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
IllegalStateException
public boolean readBoolean() throws IllegalStateException
IllegalStateException
public int readUnsignedShort() throws BufferUnderflowException, IllegalStateException
public int readInt24() throws BufferUnderflowException, IllegalStateException
public int readUnsignedInt24() throws BufferUnderflowException, IllegalStateException
public long readUnsignedInt() throws BufferUnderflowException, IllegalStateException
@Nullable public @Nullable String readUtf8() throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException, IllegalStateException, ArithmeticException
StreamingDataInput
null
values are also supportednull
if writeUtf8(null)
was calledBufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
IllegalStateException
ArithmeticException
@Nullable public @Nullable String readUTFΔ() throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException, IllegalStateException, ArithmeticException
net.openhft.chronicle.core.io.IORuntimeException
BufferUnderflowException
IllegalStateException
ArithmeticException
@Nullable public @Nullable String read8bit() throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException, IllegalStateException, ArithmeticException
net.openhft.chronicle.core.io.IORuntimeException
BufferUnderflowException
IllegalStateException
ArithmeticException
public <ACS extends Appendable & CharSequence> boolean readUtf8(@NotNull ACS sb) throws net.openhft.chronicle.core.io.IORuntimeException, IllegalArgumentException, BufferUnderflowException, IllegalStateException, ArithmeticException
StreamingDataInput
sb
- to copy chars totrue
if there was a String, or false
if it was null
net.openhft.chronicle.core.io.IORuntimeException
IllegalArgumentException
BufferUnderflowException
IllegalStateException
ArithmeticException
public <ACS extends Appendable & CharSequence> long readUtf8(long offset, @NotNull ACS sb) throws net.openhft.chronicle.core.io.IORuntimeException, IllegalArgumentException, BufferUnderflowException, ArithmeticException, IllegalStateException
RandomDataInput
sb
(it must be a StringBuilder
or Bytes
) and reads a char
sequence from the given offset
, encoded as Utf8, into it. Returns offset after
the read Utf8, if a normal char sequence was read, or -1 - offset
, if null
was observed (in this case, sb
is truncated too, but not updated then, by querying
sb
only this case is indistinguishable from reading an empty char sequence).readUtf8
in interface RandomDataInput
ACS
- buffer type, must be StringBuilder
or Bytes
offset
- the offset in this RandomDataInput
to read char sequence fromsb
- the buffer to read char sequence into (truncated first)null
net.openhft.chronicle.core.io.IORuntimeException
IllegalArgumentException
BufferUnderflowException
ArithmeticException
IllegalStateException
RandomDataOutput.writeUtf8(long, CharSequence)
public <ACS extends Appendable & CharSequence> long readUtf8Limited(long offset, @NotNull ACS sb, int maxUtf8Len) throws net.openhft.chronicle.core.io.IORuntimeException, IllegalArgumentException, BufferUnderflowException, IllegalStateException
RandomDataInput
sb
(it must be a StringBuilder
or Bytes
) and reads a char
sequence from the given offset
, encoded as Utf8, into it. Returns offset after
the read Utf8, if a normal char sequence was read, or -1 - offset
, if null
was observed (in this case, sb
is truncated too, but not updated then, by querying
sb
only this case is indistinguishable from reading an empty char sequence). If
length of Utf8 encoding of the char sequence exceeds maxUtf8Len
,
IllegalStateException
is thrown.readUtf8Limited
in interface RandomDataInput
ACS
- buffer type, must be StringBuilder
or Bytes
offset
- the offset in this RandomDataInput
to read char sequence fromsb
- the buffer to read char sequence into (truncated first)maxUtf8Len
- the maximum allowed length of the char sequence in Utf8 encodingnull
net.openhft.chronicle.core.io.IORuntimeException
IllegalArgumentException
BufferUnderflowException
IllegalStateException
RandomDataOutput.writeUtf8Limited(long, CharSequence, int)
@Nullable public @Nullable String readUtf8Limited(long offset, int maxUtf8Len) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException, IllegalArgumentException, IllegalStateException
RandomDataInput
offset
, encoded as Utf8. If length of Utf8
encoding of the char sequence exceeds maxUtf8Len
, IllegalStateException
is thrown.readUtf8Limited
in interface RandomDataInput
offset
- the offset in this RandomDataInput
to read char sequence frommaxUtf8Len
- the maximum allowed length of the char sequence in Utf8 encodingBufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
IllegalArgumentException
IllegalStateException
RandomDataOutput.writeUtf8Limited(long, CharSequence, int)
public <ACS extends Appendable & CharSequence> boolean readUTFΔ(@NotNull ACS sb) throws net.openhft.chronicle.core.io.IORuntimeException, IllegalArgumentException, BufferUnderflowException, IllegalStateException, ArithmeticException
net.openhft.chronicle.core.io.IORuntimeException
IllegalArgumentException
BufferUnderflowException
IllegalStateException
ArithmeticException
public boolean read8bit(@NotNull @NotNull Bytes b) throws BufferUnderflowException, IllegalStateException, BufferOverflowException, ArithmeticException
public <ACS extends Appendable & CharSequence> boolean read8bit(@NotNull ACS sb) throws net.openhft.chronicle.core.io.IORuntimeException, IllegalArgumentException, BufferUnderflowException, IllegalStateException, ArithmeticException
net.openhft.chronicle.core.io.IORuntimeException
IllegalArgumentException
BufferUnderflowException
IllegalStateException
ArithmeticException
public boolean read8bit(@NotNull @NotNull StringBuilder sb) throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException, ArithmeticException, IllegalStateException
net.openhft.chronicle.core.io.IORuntimeException
BufferUnderflowException
ArithmeticException
IllegalStateException
public int read(@NotNull @NotNull byte[] bytes) throws IllegalStateException, BufferUnderflowException
public int read(@NotNull @NotNull byte[] bytes, int off, int len) throws IllegalStateException, BufferUnderflowException
public int read(@NotNull @NotNull char[] bytes, int off, int len) throws IllegalStateException
IllegalStateException
public void read(@NotNull @NotNull ByteBuffer buffer) throws IllegalStateException
IllegalStateException
public void read(@NotNull @NotNull Bytes bytes, int length) throws BufferUnderflowException, IllegalStateException, BufferOverflowException
@NotNull public <E extends Enum<E>> E readEnum(@NotNull @NotNull Class<E> eClass) throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException, IllegalStateException, ArithmeticException, BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
BufferUnderflowException
IllegalStateException
ArithmeticException
BufferOverflowException
public void readHistogram(@NotNull @NotNull net.openhft.chronicle.core.util.Histogram histogram) throws BufferUnderflowException, IllegalStateException, ArithmeticException
public void readWithLength(Bytes bytes) throws ArithmeticException, BufferOverflowException, IllegalStateException, BufferUnderflowException
@NotNull public @NotNull Bytes<Void> writePosition(long position) throws BufferOverflowException
writePosition
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
@NotNull public @NotNull Bytes<Void> writeLimit(long limit) throws BufferOverflowException
writeLimit
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
@NotNull public @NotNull Bytes<Void> writeSkip(long bytesToSkip) throws BufferOverflowException, IllegalStateException
StreamingDataOutput
writeSkip
in interface StreamingDataOutput<Bytes<Void>>
bytesToSkip
- bytes to skip.BufferOverflowException
- if the offset is outside the limits of the BytesIllegalStateException
@NotNull public @NotNull Bytes<Void> writeByte(byte i8) throws BufferOverflowException, IllegalStateException
writeByte
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
public long writePosition()
@NotNull public @NotNull Bytes<Void> writeShort(short i16) throws BufferOverflowException, IllegalStateException
writeShort
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeInt(int i) throws BufferOverflowException, IllegalStateException
writeInt
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeIntAdv(int i, int advance) throws BufferOverflowException, IllegalStateException
writeIntAdv
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeLong(long i64) throws BufferOverflowException, IllegalStateException
StreamingDataOutput
writeLong
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeLongAdv(long i64, int advance) throws BufferOverflowException, IllegalStateException
writeLongAdv
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeFloat(float f) throws BufferOverflowException, IllegalStateException
writeFloat
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeDouble(double d) throws BufferOverflowException, IllegalStateException
writeDouble
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeDoubleAndInt(double d, int i) throws BufferOverflowException, IllegalStateException
writeDoubleAndInt
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
public long realWriteRemaining()
realWriteRemaining
in interface StreamingDataOutput<Bytes<Void>>
@NotNull public @NotNull Bytes<Void> write(byte[] bytes, int offset, int length) throws BufferOverflowException, IllegalArgumentException, IllegalStateException
StreamingDataOutput
write
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalArgumentException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeSome(ByteBuffer buffer) throws BufferOverflowException, IllegalStateException, BufferUnderflowException
writeSome
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
BufferUnderflowException
@NotNull public @NotNull Bytes<Void> writeOrderedInt(int i) throws BufferOverflowException, IllegalStateException
writeOrderedInt
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeOrderedLong(long i) throws BufferOverflowException, IllegalStateException
writeOrderedLong
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> clearAndPad(long length) throws BufferOverflowException, IllegalStateException
BytesPrepender
clearAndPad
in interface BytesPrepender<Bytes<Void>>
length
- to padBufferOverflowException
- if the length > capacity() - start()IllegalStateException
@NotNull public @NotNull Bytes<Void> prewrite(byte[] bytes)
BytesPrepender
Note: it moves the readPosition not the writePosition / readLimit
prewrite
in interface BytesPrepender<Bytes<Void>>
bytes
- to prepend to.@NotNull public @NotNull Bytes<Void> prewrite(BytesStore bytes)
BytesPrepender
Note: it moves the readPosition not the writePosition / readLimit
prewrite
in interface BytesPrepender<Bytes<Void>>
bytes
- to prepend to.@NotNull public @NotNull Bytes<Void> prewriteByte(byte b)
BytesPrepender
Note: it moves the readPosition not the writePosition / readLimit
prewriteByte
in interface BytesPrepender<Bytes<Void>>
b
- byte to prepend to.@NotNull public @NotNull Bytes<Void> prewriteShort(short i)
BytesPrepender
Note: it moves the readPosition not the writePosition / readLimit
prewriteShort
in interface BytesPrepender<Bytes<Void>>
i
- short to prepend to.@NotNull public @NotNull Bytes<Void> prewriteInt(int i)
BytesPrepender
Note: it moves the readPosition not the writePosition / readLimit
prewriteInt
in interface BytesPrepender<Bytes<Void>>
i
- integer to prepend to.@NotNull public @NotNull Bytes<Void> prewriteLong(long l)
BytesPrepender
Note: it moves the readPosition not the writePosition / readLimit
prewriteLong
in interface BytesPrepender<Bytes<Void>>
l
- long to prepend to.public byte readByte(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readByte
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public int peekUnsignedByte(long offset) throws IllegalStateException, BufferUnderflowException
RandomDataInput
peekUnsignedByte
in interface RandomDataInput
offset
- to readIllegalStateException
BufferUnderflowException
public short readShort(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readShort
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public int readInt(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readInt
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public long readLong(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readLong
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public float readFloat(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readFloat
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public double readDouble(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readDouble
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public byte readVolatileByte(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readVolatileByte
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public short readVolatileShort(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readVolatileShort
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public int readVolatileInt(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readVolatileInt
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public long readVolatileLong(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readVolatileLong
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public void nativeRead(long position, long address, long size) throws BufferUnderflowException, IllegalStateException
RandomDataInput
nativeRead
in interface RandomDataInput
position
- within the ByteStore to copy.address
- in native memorysize
- in bytesBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
public long readPosition()
public void lenient(boolean lenient)
StreamingDataInput
lenient
- if true, return nothing rather than error.public boolean lenient()
public void writeMarshallableLength16(WriteBytesMarshallable marshallable) throws IllegalArgumentException, BufferOverflowException, BufferUnderflowException, IllegalStateException
writeMarshallableLength16
in interface Bytes<Void>
writeMarshallableLength16
in interface BytesOut<Void>
IllegalArgumentException
BufferOverflowException
BufferUnderflowException
IllegalStateException
public Bytes write(InputStream inputStream) throws IOException, IllegalStateException, BufferOverflowException
write
in interface Bytes<Void>
IOException
IllegalStateException
BufferOverflowException
@NotNull public @NotNull Bytes<Void> writeStopBit(long x) throws BufferOverflowException, IllegalStateException
StreamingDataOutput
writeStopBit
in interface StreamingDataOutput<Bytes<Void>>
x
- long to writeBufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeStopBit(char x) throws BufferOverflowException, IllegalStateException
writeStopBit
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeStopBit(double d) throws BufferOverflowException, IllegalStateException
writeStopBit
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeStopBitDecimal(double d) throws BufferOverflowException, IllegalStateException
writeStopBitDecimal
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeUtf8(CharSequence cs) throws BufferOverflowException, IllegalStateException, IllegalArgumentException
StreamingDataOutput
writeUTF
with the following changes. 1) The length is stop bit encoded
i.e. one byte longer for short strings, but is not limited in length. 2) The string can be null.writeUtf8
in interface StreamingDataOutput<Bytes<Void>>
cs
- the string value to be written. Can be null.BufferOverflowException
- if there is not enough space leftIllegalStateException
IllegalArgumentException
@NotNull public @NotNull Bytes<Void> writeUtf8(String s) throws BufferOverflowException, IllegalStateException
writeUtf8
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeUTFΔ(CharSequence cs) throws BufferOverflowException, IllegalStateException, IllegalArgumentException, BufferUnderflowException
writeUTFΔ
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
IllegalArgumentException
BufferUnderflowException
@NotNull public @NotNull Bytes<Void> write8bit(@Nullable @Nullable CharSequence cs) throws BufferOverflowException, IllegalStateException, BufferUnderflowException, ArithmeticException
write8bit
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
BufferUnderflowException
ArithmeticException
@NotNull public @NotNull Bytes<Void> write8bit(@NotNull @NotNull CharSequence s, int start, int length) throws BufferOverflowException, IndexOutOfBoundsException, IllegalStateException, BufferUnderflowException, ArithmeticException
write8bit
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IndexOutOfBoundsException
IllegalStateException
BufferUnderflowException
ArithmeticException
@NotNull public @NotNull Bytes<Void> write(CharSequence cs) throws BufferOverflowException, IllegalStateException, IndexOutOfBoundsException
write
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
IndexOutOfBoundsException
@NotNull public @NotNull Bytes<Void> write(@NotNull @NotNull CharSequence s, int start, int length) throws BufferOverflowException, IndexOutOfBoundsException, IllegalStateException
write
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IndexOutOfBoundsException
IllegalStateException
@NotNull public @NotNull Bytes<Void> write8bit(@Nullable @Nullable String s) throws BufferOverflowException, IllegalStateException, ArithmeticException
write8bit
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
ArithmeticException
@NotNull public @NotNull Bytes<Void> write8bit(@Nullable @Nullable BytesStore bs) throws BufferOverflowException, IllegalStateException, BufferUnderflowException
write8bit
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
BufferUnderflowException
@NotNull public @NotNull Bytes<Void> writeUnsignedByte(int i) throws BufferOverflowException, IllegalStateException, ArithmeticException
writeUnsignedByte
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
ArithmeticException
@NotNull public @NotNull Bytes<Void> writeUnsignedShort(int u16) throws BufferOverflowException, IllegalStateException, ArithmeticException
writeUnsignedShort
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
ArithmeticException
@NotNull public @NotNull Bytes<Void> writeInt24(int i) throws BufferOverflowException, IllegalStateException, ArithmeticException
writeInt24
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
ArithmeticException
@NotNull public @NotNull Bytes<Void> writeUnsignedInt24(int i) throws BufferOverflowException, IllegalStateException, ArithmeticException
writeUnsignedInt24
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
ArithmeticException
@NotNull public @NotNull Bytes<Void> writeUnsignedInt(long i) throws BufferOverflowException, ArithmeticException, IllegalStateException
writeUnsignedInt
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
ArithmeticException
IllegalStateException
@NotNull public @NotNull Bytes<Void> write(@NotNull @NotNull RandomDataInput bytes) throws IllegalStateException, BufferOverflowException
StreamingDataOutput
write
in interface StreamingDataOutput<Bytes<Void>>
IllegalStateException
BufferOverflowException
public Bytes<Void> write(@NotNull @NotNull BytesStore bytes) throws IllegalStateException, BufferOverflowException
StreamingDataOutput
write
in interface StreamingDataOutput<Bytes<Void>>
bytes
- to writeIllegalStateException
BufferOverflowException
StreamingDataInput.read(Bytes)
@NotNull public @NotNull Bytes<Void> writeSome(@NotNull @NotNull Bytes bytes) throws IllegalStateException
writeSome
in interface StreamingDataOutput<Bytes<Void>>
IllegalStateException
@NotNull public @NotNull Bytes<Void> write(@NotNull @NotNull RandomDataInput bytes, long offset, long length) throws BufferOverflowException, BufferUnderflowException, IllegalStateException, IllegalArgumentException
StreamingDataOutput
write
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
BufferUnderflowException
IllegalStateException
IllegalArgumentException
@NotNull public @NotNull Bytes<Void> write(@NotNull @NotNull BytesStore bytes, long offset, long length) throws BufferOverflowException, BufferUnderflowException, IllegalStateException, IllegalArgumentException
StreamingDataOutput
write
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
BufferUnderflowException
IllegalStateException
IllegalArgumentException
@NotNull public @NotNull Bytes<Void> write(@NotNull @NotNull byte[] bytes) throws BufferOverflowException, IllegalStateException
write
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
@NotNull public @NotNull Bytes<Void> writeBoolean(boolean flag) throws BufferOverflowException, IllegalStateException
writeBoolean
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
public <E extends Enum<E>> Bytes<Void> writeEnum(@NotNull E e) throws BufferOverflowException, IllegalStateException, ArithmeticException
writeEnum
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
IllegalStateException
ArithmeticException
public void writePositionRemaining(long position, long length) throws BufferOverflowException
writePositionRemaining
in interface StreamingDataOutput<Bytes<Void>>
BufferOverflowException
public void writeHistogram(@NotNull @NotNull net.openhft.chronicle.core.util.Histogram histogram) throws IllegalStateException, BufferOverflowException
writeHistogram
in interface StreamingDataOutput<Bytes<Void>>
IllegalStateException
BufferOverflowException
public void writeBigDecimal(@NotNull @NotNull BigDecimal bd) throws IllegalArgumentException, IllegalStateException, BufferOverflowException
writeBigDecimal
in interface StreamingDataOutput<Bytes<Void>>
IllegalArgumentException
IllegalStateException
BufferOverflowException
public void writeBigInteger(@NotNull @NotNull BigInteger bi) throws IllegalArgumentException, IllegalStateException, BufferOverflowException
writeBigInteger
in interface StreamingDataOutput<Bytes<Void>>
IllegalArgumentException
IllegalStateException
BufferOverflowException
public void writeWithLength(RandomDataInput bytes) throws IllegalStateException, BufferOverflowException
writeWithLength
in interface StreamingDataOutput<Bytes<Void>>
IllegalStateException
BufferOverflowException
@NotNull public @NotNull Reader reader()
@Nullable public @Nullable Boolean parseBoolean(@NotNull @NotNull StopCharTester tester) throws BufferUnderflowException, IllegalStateException, ArithmeticException
false: f, false, n, no, 0
true: t, true, y, yes, 1
tester
- to detect the end of the text.BufferUnderflowException
IllegalStateException
ArithmeticException
@Nullable public @Nullable Boolean parseBoolean() throws BufferUnderflowException, IllegalStateException, ArithmeticException
@NotNull public @NotNull String parseUtf8(@NotNull @NotNull StopCharTester stopCharTester) throws IllegalStateException, ArithmeticException
stopCharTester
- to check if the end has been reached.IllegalStateException
ArithmeticException
@NotNull @Deprecated public @NotNull String parseUTF(@NotNull @NotNull StopCharTester stopCharTester) throws IllegalStateException, ArithmeticException
public void parseUtf8(@NotNull @NotNull Appendable buffer, @NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, IllegalStateException, ArithmeticException
buffer
- to populatestopCharTester
- to check if the end has been reached.BufferUnderflowException
IllegalStateException
ArithmeticException
@Deprecated public void parseUTF(@NotNull @NotNull Appendable buffer, @NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, IllegalStateException, ArithmeticException
public void parseUtf8(@NotNull @NotNull Appendable buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException, IllegalStateException
buffer
- to populatestopCharsTester
- to check if the end has been reached.BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
IllegalStateException
@Deprecated public void parseUTF(@NotNull @NotNull Appendable buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException, IllegalStateException
BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
IllegalStateException
public void parse8bit(Appendable buffer, @NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, BufferOverflowException, IllegalStateException, ArithmeticException
buffer
- to populatestopCharTester
- to check if the end has been reached.BufferUnderflowException
BufferOverflowException
IllegalStateException
ArithmeticException
public String parse8bit(@NotNull @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, IllegalStateException
stopCharTester
- to check if the end has been reached.BufferUnderflowException
IllegalStateException
public void parse8bit(Appendable buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, BufferOverflowException, IllegalStateException, ArithmeticException
buffer
- to populatestopCharsTester
- to check if the end has been reached.BufferUnderflowException
BufferOverflowException
IllegalStateException
ArithmeticException
public void parse8bit(Bytes buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, BufferOverflowException, IllegalStateException, ArithmeticException
public void parse8bit(StringBuilder buffer, @NotNull @NotNull StopCharsTester stopCharsTester) throws IllegalStateException
IllegalStateException
public int parseInt() throws BufferUnderflowException, ArithmeticException, IllegalStateException
BufferUnderflowException
ArithmeticException
IllegalStateException
public long parseLong() throws BufferUnderflowException, IllegalStateException
BufferUnderflowException
IllegalStateException
public float parseFloat() throws BufferUnderflowException, IllegalStateException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowException
IllegalStateException
public double parseDouble() throws BufferUnderflowException, IllegalStateException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowException
IllegalStateException
public long parseLongDecimal() throws BufferUnderflowException, IllegalStateException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowException
IllegalStateException
public boolean skipTo(@NotNull @NotNull StopCharTester tester) throws IllegalStateException
tester
- to stop atIllegalStateException
@NotNull public @NotNull BigDecimal parseBigDecimal() throws IllegalStateException, ArithmeticException
public long start()
public long addressForRead(long offset, int buffer) throws UnsupportedOperationException, BufferUnderflowException, IllegalStateException
public ByteOrder byteOrder()
public boolean compareAndSwapFloat(long offset, float expected, float value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
public boolean compareAndSwapDouble(long offset, double expected, double value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
Copyright © 2021. All rights reserved.