public class PointerBytesStore extends NativeBytesStore<Void>
address, limit, maximumLimit, memory
referenceCounted, WARN_COUNT, WARN_NS
charToString
Constructor and Description |
---|
PointerBytesStore() |
Modifier and Type | Method and Description |
---|---|
default long |
addressForRead(long offset,
int buffer) |
default ByteOrder |
byteOrder() |
@NotNull VanillaBytes<Void> |
bytesForWrite()
Returns a Bytes that wraps this ByteStore from the
start to the realCapacity . |
default long |
lengthWritten(long startPosition)
Typically this calculates the difference however for HexDumpBytes it's not as simple.
|
default long |
readLimit()
If the resource is closed, the returned value is unspecified.
|
default long |
realReadRemaining()
If the resource is closed, the returned value is unspecified.
|
default long |
realWriteRemaining()
If the resource is closed, the returned value is unspecified.
|
long |
safeLimit() |
void |
set(long address,
long capacity) |
long |
start() |
default long |
writeLimit()
Returns the write limit.
|
default long |
writePosition()
Returns the write position.
|
addAndGetInt, addAndGetLong, addressForRead, addressForWrite, addressForWritePosition, appendUtf8, backgroundPerformRelease, byteCheckSum, byteCheckSum, canReadDirect, capacity, compareAndSwapInt, compareAndSwapLong, copy, copyTo, copyToDirect, elasticByteBuffer, elasticByteBuffer, equals, fastHash, from, from, hashCode, init, isDirectMemory, isEqual, lazyNativeBytesStoreWithFixedCapacity, move, nativeRead, nativeStore, nativeStoreWithFixedCapacity, nativeWrite, peekUnsignedByte, performRelease, read, read8bit, readByte, readDouble, readFloat, readIncompleteLong, readInt, readLong, readShort, readUnsignedByte, readVolatileByte, readVolatileInt, readVolatileLong, readVolatileShort, realCapacity, setAddress, sharedMemory, testAndSetInt, toString, toTemporaryDirectByteBuffer, translate, underlyingObject, uninit, uninitialized, wrap, write, write, write, write0, write8bit, write8bit, writeByte, writeDouble, writeFloat, writeInt, writeLong, writeOrderedInt, writeOrderedLong, writeShort, writeVolatileByte, writeVolatileInt, writeVolatileLong, writeVolatileShort, zeroOut
canReleaseInBackground, readPosition, readRemaining, writeRemaining
assertReferencesReleased, clearUsedByThread, createdHere, disableReferenceTracing, enableReferenceTracing, refCount, referenceId, release, releaseLast, reserve, reservedBy, reserveTransfer, singleThreadedCheckDisabled, singleThreadedCheckReset, threadSafetyCheck, throwExceptionIfNotReleased, throwExceptionIfReleased, tryReserve, unmonitor, warnAndReleaseIfNotReleased
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAndGetDouble, addAndGetDoubleNotAtomic, addAndGetFloat, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, bytesForRead, bytesStore, charAt, cipher, cipher, compareAndSwapDouble, compareAndSwapFloat, contentEquals, copyTo, empty, endsWith, equalBytes, forFields, from, from, hash, inside, inside, isClear, isEmpty, isImmutableEmptyByteStore, length, nativePointer, nativeStoreFrom, readWrite, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, writeMaxInt, writeMaxLong
canReadDirect, compareUtf8, copyTo, copyTo, createCharToString, findByte, parseLong, peekVolatileInt, printable, readBoolean, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileDouble, readVolatileFloat, subBytes, toByteArray
append, append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloat
refCount, release, releaseLast, releaseLast, reserve, reservedBy, reserveTransfer, tryReserve
referenceId, referenceName, temporary
chars, codePoints
public void set(long address, long capacity)
@NotNull public @NotNull VanillaBytes<Void> bytesForWrite() throws IllegalStateException
BytesStore
start
to the realCapacity
.
The returned Bytes is not elastic and can be both read and written using cursors.
bytesForWrite
in interface BytesStore<NativeBytesStore<Void>,Void>
bytesForWrite
in class NativeBytesStore<Void>
IllegalStateException
- if this BytesStore has been releasedpublic long safeLimit()
safeLimit
in interface BytesStore<NativeBytesStore<Void>,Void>
safeLimit
in class NativeBytesStore<Void>
public long start()
start
in class AbstractBytesStore<NativeBytesStore<Void>,Void>
public long writePosition()
readPosition() <= writePosition() && writePosition() <= writeLimit()
If the resource is closed, the returned value is unspecified.
public long lengthWritten(long startPosition)
If the resource is closed, the returned value is unspecified.
startPosition
- to compare againstpublic 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 readLimit()
If the resource is closed, the returned value is unspecified.
public long writeLimit()
If the resource is closed, the returned value is unspecified.
public long addressForRead(long offset, int buffer) throws UnsupportedOperationException, BufferUnderflowException, IllegalStateException
public ByteOrder byteOrder()
Copyright © 2022. All rights reserved.