public abstract class CommonMappedBytes extends MappedBytes
NOTE These Bytes are single Threaded as are all Bytes.
Modifier and Type | Field and Description |
---|---|
protected long |
lastActualSize |
protected MappedFile |
mappedFile |
TRACE
bytesStore, DISABLE_THREAD_SAFETY, isPresent, readPosition, writeLimit
referenceCounted, WARN_COUNT, WARN_NS
DEFAULT_BYTE_BUFFER_CAPACITY, MAX_CAPACITY, MAX_HEAP_CAPACITY
charToString
JAVA9_STRING_CODER_LATIN, JAVA9_STRING_CODER_UTF16
Modifier | Constructor and Description |
---|---|
protected |
CommonMappedBytes(@NotNull MappedFile mappedFile) |
protected |
CommonMappedBytes(@NotNull MappedFile mappedFile,
String name) |
Modifier and Type | Method and Description |
---|---|
@NotNull Bytes<Void> |
append8bit(@NotNull CharSequence text,
int start,
int end)
Appends a portion of a string to this Bytes in ISO-8859-1.
|
@NotNull Bytes<Void> |
appendUtf8(@NotNull CharSequence cs,
int start,
int length)
Appends a UTF-8 encoded CharSequence to this output stream from a specific offset and length.
|
long |
capacity()
Provides the maximum limit that can be set for the ByteStore.
|
void |
chunkCount(long[] chunkCount)
Updates the number of chunks in the mapped file.
|
@NotNull Bytes<Void> |
clear()
Clears the content of this Bytes object and resets its state.
|
void |
close() |
BytesStore<Bytes<Void>,Void> |
copy()
Creates and returns a deep copy of this Bytes object, including the data between
RandomCommon.readPosition() and RandomCommon.readLimit() . |
CommonMappedBytes |
disableThreadSafetyCheck(boolean disableThreadSafetyCheck)
Deprecated.
|
boolean |
isBackingFileReadOnly()
Checks if the backing file is read-only.
|
boolean |
isClosed() |
boolean |
isDirectMemory()
Checks if this BytesStore uses direct memory.
|
@NotNull MappedFile |
mappedFile()
Retrieves the mapped file.
|
protected void |
performRelease() |
@Nullable String |
read8bit()
Reads an 8-bit encoded string from the input stream.
|
Bytes<Void> |
readLimitToCapacity()
Sets the read limit of this StreamingDataInput to its capacity.
|
long |
readStopBit()
Reads a variable-length integer encoded using the stop bit encoding.
|
char |
readStopBitChar()
Reads a variable-length character encoded using the stop bit encoding.
|
boolean |
readWrite()
Checks if this Bytes object supports both reading and writing.
|
long |
realCapacity()
Returns the actual capacity of the ByteStore before any resizing occurs.
|
long |
realReadRemaining()
Calculates the number of bytes that can be safely read directly.
|
long |
realWriteRemaining()
Calculates the number of bytes remaining that can be written from the current write position with resizing.
|
void |
release(net.openhft.chronicle.core.io.ReferenceOwner id) |
void |
releaseLast(net.openhft.chronicle.core.io.ReferenceOwner id) |
void |
singleThreadedCheckDisabled(boolean singleThreadedCheckDisabled) |
void |
singleThreadedCheckReset() |
long |
start() |
void |
throwExceptionIfClosed() |
@NotNull String |
toString() |
void |
warnAndCloseIfNotClosed() |
@NotNull CommonMappedBytes |
write(byte[] byteArray,
int offset,
int length)
Writes the specified number of bytes from the given
byteArray into the output stream, starting from the
given offset. |
@NotNull CommonMappedBytes |
write(long offsetInRDO,
@NotNull RandomDataInput bytes) |
@NotNull CommonMappedBytes |
write(@NotNull RandomDataInput bytes)
Writes all available data from the specified
RandomDataInput into the output stream. |
@NotNull Bytes<Void> |
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. |
@NotNull CommonMappedBytes |
write8bit(@NotNull CharSequence text,
int start,
int length)
Writes a subsequence of a CharSequence as an 8-bit string to the data stream.
|
@NotNull Bytes<Void> |
writePosition(long position)
Sets the current write position in the data stream.
|
@NotNull Bytes<Void> |
writeSkip(long bytesToSkip)
Skips a specified number of bytes from the current write position in the data stream.
|
@NotNull Bytes<Void> |
writeStopBit(char n)
Writes a stop bit encoded char to the data stream.
|
@NotNull Bytes<Void> |
writeStopBit(long n)
Writes a stop bit encoded long to the data stream.
|
@NotNull Bytes<Void> |
writeUtf8(@Nullable CharSequence text)
Writes a UTF-8 encoded string to the data stream, similar to writeUTF, but with a few differences.
|
@NotNull Bytes<Void> |
writeUtf8(@Nullable String text)
Writes a UTF-8 encoded String to the data stream.
|
bytesForRead, bytesForWrite, mappedBytes, mappedBytes, mappedBytes, mappedBytes, mappedBytes, mappedBytes, readOnly, sharedMemory, singleMappedBytes, singleMappedBytes, singleMappedBytes, sync
acquireUncheckedInput, addressForRead, addressForWrite, addressForWritePosition, append, append, append, append, append, append, appendAndReturnLength, byteCheckSum, byteCheckSum, byteCheckSum, bytesStore, bytesStore, canReadDirect, canWriteDirect, clearAndPad, compact, compareAndSwapInt, compareAndSwapLong, copyTo, decimaliser, decimaliser, equals, fpAppend0, fpAppend0, hashCode, internalNumberBuffer, isElastic, isImmutableEmptyByteStore, lastDecimalPlaces, lastDecimalPlaces, lastNumberHadDigits, lastNumberHadDigits, length, lenient, lenient, move, nativeRead, nativeWrite, peekUnsignedByte, peekUnsignedByte, 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, readVolatileLong, readVolatileShort, safeCopySize, startsWith, testAndSetInt, uncheckedReadSkipBackOne, uncheckedReadSkipOne, uncheckedReadUnsignedByte, uncheckedWritePosition, underlyingObject, 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, writeShort, writeShort, writeSome, writeVolatileByte, writeVolatileInt, writeVolatileLong, writeVolatileShort
addReferenceChangeListener, assertReferencesReleased, backgroundPerformRelease, canReleaseInBackground, clearUsedByThread, createdHere, disableReferenceTracing, enableReferenceTracing, refCount, referenceCountedUnmonitored, referenceId, removeReferenceChangeListener, reserve, reservedBy, reserveTransfer, threadSafetyCheck, throwExceptionIfNotReleased, throwExceptionIfReleased, tryReserve, unmonitor, warnAndReleaseIfNotReleased
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
allocateDirect, allocateDirect, allocateElasticDirect, allocateElasticDirect, allocateElasticOnHeap, allocateElasticOnHeap, copyTo, copyTo, directFrom, elasticByteBuffer, elasticByteBuffer, elasticByteBuffer, elasticHeapByteBuffer, elasticHeapByteBuffer, empty, ensureCapacity, forFieldGroup, from, from, fromDirect, fromHexString, indexOf, indexOf, isClear, isEqual, readMarshallableLength16, readWithLength, safeLimit, toHexString, toHexString, toHexString, toString, toString, toString, unchecked, unchecked, unwrite, valueOf, wrapForRead, wrapForRead, wrapForWrite, wrapForWrite, write, writeMarshallableLength16
addAndGetDouble, addAndGetDoubleNotAtomic, addAndGetFloat, addAndGetFloatNotAtomic, addAndGetInt, addAndGetIntNotAtomic, addAndGetLong, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, charAt, cipher, cipher, compareAndSwapDouble, compareAndSwapFloat, contentEquals, elasticByteBuffer, endsWith, equalBytes, follow, forFields, from, hash, inside, inside, isEmpty, isEqual, lazyNativeBytesStoreWithFixedCapacity, nativePointer, nativeStore, nativeStoreFrom, nativeStoreWithFixedCapacity, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, wrap, writeMaxInt, writeMaxLong, zeroOut
append, append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloat
chars, codePoints
bytesMethodReader, bytesMethodReaderBuilder, readObject
canReadDirect, compareUtf8, copyTo, createCharToString, fastHash, findByte, parseLong, peekVolatileInt, printable, readBoolean, readIncompleteLong, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileDouble, readVolatileFloat, subBytes, toByteArray, toTemporaryDirectByteBuffer
parse8bit, parse8bit, parse8bit, parse8bit, parse8bit, parseBigDecimal, parseBoolean, parseBoolean, parseDouble, parseFlexibleLong, parseFloat, parseInt, parseLong, parseLongDecimal, parseUtf8, parseUtf8, parseUtf8, reader, skipTo
inputStream, parseHexLong, parseUtf8, parseUtf8, rawReadByte, rawReadInt, rawReadLong, read, read, read, read, read, read8bit, read8bit, readBigDecimal, readBigInteger, readBoolean, readChar, readEnum, readHistogram, readIncompleteLong, readInt24, readPositionRemaining, readPositionUnlimited, readStopBitDecimal, readStopBitDouble, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8, readUtf8, readUtf8, readWithLength, readWithLength, readWithLength0, unsafeRead, unsafeReadObject, unsafeReadObject
bytesMethodWriter, writeObject
append, append, append, append, append, append8bit, append8bit, append8bit, append8bit, appendBase, appendBase16, appendBase16, appendDateMillis, appendDecimal, appendTimeMillis, writer
appendUtf8, appendUtf8, appendUtf8, appendUtf8, appendUtf8, copyFrom, outputStream, rawWriteByte, rawWriteInt, rawWriteLong, unsafeWrite, unsafeWriteObject, unsafeWriteObject, write, write, write, write, write8bit, write8bit, writeBigDecimal, writeBigInteger, writeChar, writeEnum, writeHistogram, writeInt24, writePositionForHeader, writePositionRemaining, writeSome, writeStopBit, writeStopBitDecimal, writeUnsignedByte, writeUnsignedInt, writeUnsignedInt24, writeUnsignedShort, writeWithLength
prepend
adjustHexDumpIndentation, retainedHexDumpDescription, writeHexDumpDescription
protected final MappedFile mappedFile
protected long lastActualSize
protected CommonMappedBytes(@NotNull @NotNull MappedFile mappedFile) throws net.openhft.chronicle.core.io.ClosedIllegalStateException
net.openhft.chronicle.core.io.ClosedIllegalStateException
protected CommonMappedBytes(@NotNull @NotNull MappedFile mappedFile, String name) throws net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
net.openhft.chronicle.core.io.ClosedIllegalStateException
net.openhft.chronicle.core.io.ThreadingIllegalStateException
public void singleThreadedCheckReset()
singleThreadedCheckReset
in interface net.openhft.chronicle.core.io.SingleThreadedChecked
singleThreadedCheckReset
in class net.openhft.chronicle.core.io.AbstractReferenceCounted
@NotNull public @NotNull CommonMappedBytes write(byte[] byteArray, int offset, int length) throws net.openhft.chronicle.core.io.ClosedIllegalStateException, BufferOverflowException
StreamingDataOutput
byteArray
into the output stream, starting from the
given offset. The position of the output stream is updated according to the number of bytes written.write
in interface StreamingDataOutput<Bytes<Void>>
write
in class AbstractBytes<Void>
byteArray
- the array of bytes to be written.offset
- the start index in the array from where to start writing bytes.length
- the number of bytes to write.net.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.BufferOverflowException
- If there is not enough space left in the output stream.@NotNull public @NotNull CommonMappedBytes write(@NotNull @NotNull RandomDataInput bytes) throws net.openhft.chronicle.core.io.ClosedIllegalStateException, BufferOverflowException
StreamingDataOutput
RandomDataInput
into the output stream.
The position of this output stream is updated accordingly, but the read position of the input data is not changed.
The operation will fail if there is not enough space left in the output stream.write
in interface StreamingDataOutput<Bytes<Void>>
write
in class AbstractBytes<Void>
bytes
- the RandomDataInput
from which data is read.net.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.BufferOverflowException
- If there is not enough space left in the output stream.@NotNull public @NotNull CommonMappedBytes write(long offsetInRDO, @NotNull @NotNull RandomDataInput bytes) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException
BufferOverflowException
net.openhft.chronicle.core.io.ClosedIllegalStateException
@NotNull public @NotNull MappedFile mappedFile()
MappedBytes
mappedFile
in class MappedBytes
public BytesStore<Bytes<Void>,Void> copy() throws net.openhft.chronicle.core.io.ClosedIllegalStateException
Bytes
RandomCommon.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.
net.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.public long capacity()
BytesStore
capacity
in interface BytesStore<Bytes<Void>,Void>
capacity
in class AbstractBytes<Void>
public Bytes<Void> readLimitToCapacity()
StreamingDataInput
public long realReadRemaining()
If the resource is closed, the returned value is unspecified.
public long realWriteRemaining()
If the resource is closed, the returned value is unspecified.
public long realCapacity()
BytesStore
realCapacity
in interface Bytes<Void>
realCapacity
in interface BytesStore<Bytes<Void>,Void>
realCapacity
in interface RandomDataInput
realCapacity
in interface StreamingDataOutput<Bytes<Void>>
realCapacity
in class AbstractBytes<Void>
@Nullable public @Nullable String read8bit() throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, ArithmeticException
StreamingDataInput
null
if write8bit(null)
was callednet.openhft.chronicle.core.io.IORuntimeException
- If an IO error occursBufferUnderflowException
- If there's not enough data to readnet.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.ArithmeticException
- If numeric overflow or underflow occurs@NotNull public @NotNull Bytes<Void> writeSkip(long bytesToSkip) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutput
writeSkip
in interface StreamingDataOutput<Bytes<Void>>
writeSkip
in class AbstractBytes<Void>
bytesToSkip
- The number of bytes to skip. This can be a negative number to move the
position backward.BufferOverflowException
- If the new position calculated by the skip operation falls
outside the limits of the data buffer.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 long start()
start
in class AbstractBytes<Void>
@NotNull public @NotNull Bytes<Void> writePosition(long position) throws BufferOverflowException
StreamingDataOutput
writePosition
in interface StreamingDataOutput<Bytes<Void>>
writePosition
in class AbstractBytes<Void>
position
- The new write position. It must be a non-negative number.BufferOverflowException
- If the specified position exceeds the limit of the data buffer.@NotNull public @NotNull Bytes<Void> clear() throws net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ClosedIllegalStateException
Bytes
clear
in interface Bytes<Void>
clear
in interface StreamingCommon<Bytes<Void>>
clear
in class AbstractBytes<Void>
net.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.protected void performRelease() throws net.openhft.chronicle.core.io.ClosedIllegalStateException
performRelease
in class AbstractBytes<Void>
net.openhft.chronicle.core.io.ClosedIllegalStateException
@NotNull public @NotNull Bytes<Void> write(@NotNull @NotNull RandomDataInput bytes, long offset, long length) throws BufferUnderflowException, BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutput
RandomDataInput
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.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.BufferUnderflowException
- If there is not enough data available in the input.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.net.openhft.chronicle.core.io.ThreadingIllegalStateException
- If this resource was accessed by multiple threads in an unsafe way@NotNull public @NotNull Bytes<Void> append8bit(@NotNull @NotNull CharSequence text, int start, int end) throws IllegalArgumentException, BufferOverflowException, BufferUnderflowException, IndexOutOfBoundsException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
ByteStringAppender
text
- the CharSequence to appendstart
- index of the first char of cs (inclusive) to appendend
- index of the last char of cs (exclusive) to appendIllegalArgumentException
- If the start or end is negative or too largeBufferOverflowException
- If the string is too large to write in the capacity availableBufferUnderflowException
- If the capacity of the underlying buffer was exceededIndexOutOfBoundsException
- If the start or the end are not valid for the CharSequencenet.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 CommonMappedBytes write8bit(@NotNull @NotNull CharSequence text, int start, int length) throws net.openhft.chronicle.core.io.ClosedIllegalStateException, BufferUnderflowException, BufferOverflowException, ArithmeticException, IndexOutOfBoundsException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutput
text
- The CharSequence to be written.start
- The index of the first char in the CharSequence to write.length
- The number of chars from the CharSequence to write.net.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.BufferOverflowException
- If there is insufficient space in the buffer.net.openhft.chronicle.core.io.ThreadingIllegalStateException
- If this resource was accessed by multiple threads in an unsafe wayBufferUnderflowException
ArithmeticException
IndexOutOfBoundsException
@NotNull public @NotNull Bytes<Void> appendUtf8(@NotNull @NotNull CharSequence cs, int start, int length) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, BufferUnderflowException, IndexOutOfBoundsException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutput
cs
- The CharSequence to be appended.start
- 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.IndexOutOfBoundsException
- If the offset or length is out of bounds for the given CharSequence.net.openhft.chronicle.core.io.ThreadingIllegalStateException
- If this resource was accessed by multiple threads in an unsafe waypublic void release(net.openhft.chronicle.core.io.ReferenceOwner id) throws net.openhft.chronicle.core.io.ClosedIllegalStateException
release
in interface net.openhft.chronicle.core.io.ReferenceCounted
release
in class net.openhft.chronicle.core.io.AbstractReferenceCounted
net.openhft.chronicle.core.io.ClosedIllegalStateException
public void releaseLast(net.openhft.chronicle.core.io.ReferenceOwner id) throws net.openhft.chronicle.core.io.ClosedIllegalStateException
releaseLast
in interface net.openhft.chronicle.core.io.ReferenceCounted
releaseLast
in class net.openhft.chronicle.core.io.AbstractReferenceCounted
net.openhft.chronicle.core.io.ClosedIllegalStateException
public void close()
public boolean isClosed()
public void warnAndCloseIfNotClosed()
public void throwExceptionIfClosed() throws net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
net.openhft.chronicle.core.io.ClosedIllegalStateException
net.openhft.chronicle.core.io.ThreadingIllegalStateException
@NotNull public @NotNull Bytes<Void> writeUtf8(@Nullable @Nullable CharSequence text) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutput
text
- The string to be written. Can be null.BufferOverflowException
- If there is insufficient space in the buffer.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<Void> writeUtf8(@Nullable @Nullable String text) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutput
text
- The string to be written. Can be null.BufferOverflowException
- If there is insufficient space in the buffer.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 long readStopBit() throws net.openhft.chronicle.core.io.IORuntimeException, net.openhft.chronicle.core.io.ClosedIllegalStateException, BufferUnderflowException
StreamingDataInput
BytesInternal.readStopBit(this)
.net.openhft.chronicle.core.io.IORuntimeException
- If an I/O error occursnet.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.BufferUnderflowException
- If there's not enough data to readpublic char readStopBitChar() throws net.openhft.chronicle.core.io.IORuntimeException, net.openhft.chronicle.core.io.ClosedIllegalStateException, BufferUnderflowException
StreamingDataInput
BytesInternal.readStopBitChar(this)
.net.openhft.chronicle.core.io.IORuntimeException
- If an I/O error occursnet.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.BufferUnderflowException
- If there's not enough data to read@NotNull public @NotNull Bytes<Void> writeStopBit(long n) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutput
n
- The long value to be written to the data stream.BufferOverflowException
- If there is insufficient space in the buffer.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<Void> writeStopBit(char n) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutput
n
- The char value to be written to the data stream.BufferOverflowException
- If there is insufficient space in the buffer.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 isBackingFileReadOnly()
MappedBytes
isBackingFileReadOnly
in class MappedBytes
public boolean isDirectMemory()
BytesStore
isDirectMemory
in interface BytesStore<Bytes<Void>,Void>
isDirectMemory
in class AbstractBytes<Void>
@Deprecated public CommonMappedBytes disableThreadSafetyCheck(boolean disableThreadSafetyCheck)
MappedBytes
disableThreadSafetyCheck
in class MappedBytes
disableThreadSafetyCheck
- true to disable the thread safety check, false to enable it.public void singleThreadedCheckDisabled(boolean singleThreadedCheckDisabled)
singleThreadedCheckDisabled
in interface net.openhft.chronicle.core.io.SingleThreadedChecked
singleThreadedCheckDisabled
in class net.openhft.chronicle.core.io.AbstractReferenceCounted
@NotNull public @NotNull String toString()
toString
in interface CharSequence
toString
in class AbstractBytes<Void>
public void chunkCount(long[] chunkCount)
MappedBytes
chunkCount
in class MappedBytes
chunkCount
- The new number of chunks.public boolean readWrite()
Bytes
true
if this Bytes object supports both reading and writing, false
otherwise.Copyright © 2023. All rights reserved.