public abstract class AbstractBytes<Underlying> extends Object implements Bytes<Underlying>
| Modifier and Type | Field and Description |
|---|---|
protected BytesStore<Bytes<Underlying>,Underlying> |
bytesStore |
protected long |
readPosition |
protected long |
writeLimit |
protected long |
writePosition |
MAX_CAPACITYcharToString| Modifier and Type | Method and Description |
|---|---|
long |
address(long offset)
Obtain the underlying address.
|
default ByteOrder |
byteOrder() |
BytesStore |
bytesStore() |
long |
capacity() |
Bytes<Underlying> |
clear() |
boolean |
compareAndSwapInt(long offset,
int expected,
int value) |
boolean |
compareAndSwapLong(long offset,
long expected,
long value) |
boolean |
equals(Object obj) |
boolean |
equalsBytes(Bytes b2,
long remaining) |
protected void |
finalize() |
int |
hashCode() |
void |
nativeRead(long address,
long size)
This is an expert level method for copying raw native memory in bulk.
|
void |
nativeRead(long position,
long address,
long size)
expert level method for copying data to native memory.
|
void |
nativeWrite(long address,
long size)
This is an expert level method for writing out data to native memory.
|
void |
nativeWrite(long address,
long position,
long size)
expert level method to copy data from native memory into the BytesStore
|
default void |
parse8bit(Appendable sb,
StopCharsTester stopCharsTester) |
default double |
parseDouble() |
default long |
parseLong() |
default void |
parseUTF(Appendable sb,
StopCharsTester stopCharsTester) |
default void |
parseUTF(Appendable sb,
StopCharTester stopCharTester) |
default String |
parseUTF(StopCharTester stopCharTester) |
int |
peekUnsignedByte() |
byte |
readByte() |
byte |
readByte(long offset) |
double |
readDouble() |
double |
readDouble(long offset) |
float |
readFloat() |
float |
readFloat(long offset) |
int |
readInt() |
int |
readInt(long offset) |
long |
readLimit() |
Bytes<Underlying> |
readLimit(long limit) |
long |
readLong() |
long |
readLong(long offset) |
protected long |
readOffsetPositionMoved(long adding) |
long |
readPosition() |
Bytes<Underlying> |
readPosition(long position) |
default long |
readRemaining() |
short |
readShort() |
short |
readShort(long offset) |
Bytes<Underlying> |
readSkip(long bytesToSkip) |
int |
readVolatileInt() |
long |
readVolatileLong() |
long |
realCapacity() |
long |
refCount() |
void |
release() |
void |
reserve() |
default boolean |
skipTo(StopCharTester tester) |
long |
start() |
String |
toString() |
Underlying |
underlyingObject() |
Bytes<Underlying> |
write(byte[] bytes,
int offset,
int length) |
Bytes<Underlying> |
write(ByteBuffer buffer) |
Bytes<Underlying> |
write(long offsetInRDO,
byte[] bytes,
int offset,
int length) |
void |
write(long offsetInRDO,
ByteBuffer bytes,
int offset,
int length) |
Bytes<Underlying> |
write(long offsetInRDO,
RandomDataInput bytes,
long offset,
long length) |
Bytes<Underlying> |
writeByte(byte i8) |
Bytes<Underlying> |
writeByte(long offset,
byte i) |
Bytes<Underlying> |
writeDouble(double d) |
Bytes<Underlying> |
writeDouble(long offset,
double d) |
Bytes<Underlying> |
writeFloat(float f) |
Bytes<Underlying> |
writeFloat(long offset,
float d) |
Bytes<Underlying> |
writeInt(int i) |
Bytes<Underlying> |
writeInt(long offset,
int i) |
long |
writeLimit() |
Bytes<Underlying> |
writeLimit(long limit) |
Bytes<Underlying> |
writeLong(long i64) |
Bytes<Underlying> |
writeLong(long offset,
long i) |
protected long |
writeOffsetPositionMoved(long adding) |
Bytes<Underlying> |
writeOrderedInt(int i) |
Bytes<Underlying> |
writeOrderedInt(long offset,
int i) |
Bytes<Underlying> |
writeOrderedLong(long i) |
Bytes<Underlying> |
writeOrderedLong(long offset,
long i) |
long |
writePosition() |
Bytes<Underlying> |
writePosition(long position) |
default long |
writeRemaining() |
Bytes<Underlying> |
writeShort(long offset,
short i) |
Bytes<Underlying> |
writeShort(short i16) |
Bytes<Underlying> |
writeSkip(long bytesToSkip) |
bytesForRead, copy, elasticByteBuffer, ensureCapacity, expect, expect, from, isClear, isElastic, safeLimit, toHexString, toHexString, toString, toString, unchecked, wrapForRead, wrapForRead, wrapForWrite, wrapForWriteaddAndGetInt, addAndGetLong, byteCheckSum, bytesForWrite, charAt, copyTo, equalBytes, getAndAddInt, inside, length, nativePointer, subSequence, toDebugString, wrap, wrap, zeroOutbytesEqual, copyTo, createCharToString, parseLong, printable, readBoolean, readIncompleteLong, readUnsignedByte, readUnsignedInt, readUnsignedShort, readVolatileInt, readVolatileLongappend, write, write, writeBoolean, writeByte, writeUnsignedByte, writeUnsignedInt, writeUnsignedShortclose, releaseAll, tryReservechars, codePointsinputStream, parseWithLength, read, read, readBoolean, readStopBit, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTFΔ, readUTFΔ, readWithLengthappend, append, append, append, append, append, append, append8bit, appendDateMillis, appendTimeMillisoutputStream, write, write, write, writeBoolean, writeStopBit, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUTFΔprotected BytesStore<Bytes<Underlying>,Underlying> bytesStore
protected long readPosition
protected long writePosition
protected long writeLimit
public Bytes<Underlying> clear()
public long readLimit()
public long writeLimit()
public long realCapacity()
realCapacity in interface Bytes<Underlying>realCapacity in interface BytesStore<Bytes<Underlying>,Underlying>public long capacity()
capacity in interface BytesStore<Bytes<Underlying>,Underlying>public Underlying underlyingObject()
underlyingObject in interface BytesStore<Bytes<Underlying>,Underlying>public long start()
public long readPosition()
public long writePosition()
public boolean compareAndSwapInt(long offset,
int expected,
int value)
compareAndSwapInt in interface BytesStore<Bytes<Underlying>,Underlying>public boolean compareAndSwapLong(long offset,
long expected,
long value)
compareAndSwapLong in interface BytesStore<Bytes<Underlying>,Underlying>public Bytes<Underlying> readPosition(long position)
readPosition in interface StreamingDataInput<Bytes<Underlying>>public Bytes<Underlying> readLimit(long limit)
readLimit in interface StreamingDataInput<Bytes<Underlying>>public Bytes<Underlying> writePosition(long position)
writePosition in interface StreamingDataOutput<Bytes<Underlying>>public Bytes<Underlying> readSkip(long bytesToSkip)
public Bytes<Underlying> writeSkip(long bytesToSkip)
public Bytes<Underlying> writeLimit(long limit)
writeLimit in interface StreamingDataOutput<Bytes<Underlying>>public byte readByte()
readByte in interface StreamingDataInput<Bytes<Underlying>>public int peekUnsignedByte()
peekUnsignedByte in interface StreamingDataInput<Bytes<Underlying>>public short readShort()
readShort in interface StreamingDataInput<Bytes<Underlying>>public int readInt()
readInt in interface StreamingDataInput<Bytes<Underlying>>public long readLong()
readLong in interface StreamingDataInput<Bytes<Underlying>>public float readFloat()
readFloat in interface StreamingDataInput<Bytes<Underlying>>public double readDouble()
readDouble in interface StreamingDataInput<Bytes<Underlying>>public int readVolatileInt()
readVolatileInt in interface StreamingDataInput<Bytes<Underlying>>public long readVolatileLong()
readVolatileLong in interface StreamingDataInput<Bytes<Underlying>>protected long readOffsetPositionMoved(long adding)
public void reserve()
reserve in interface net.openhft.chronicle.core.ReferenceCountedpublic void release()
release in interface net.openhft.chronicle.core.ReferenceCountedpublic long refCount()
refCount in interface net.openhft.chronicle.core.ReferenceCountedpublic Bytes<Underlying> writeByte(long offset, byte i)
writeByte in interface RandomDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeShort(long offset, short i)
writeShort in interface RandomDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeInt(long offset, int i)
writeInt in interface RandomDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeOrderedInt(long offset, int i)
writeOrderedInt in interface RandomDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeLong(long offset, long i)
writeLong in interface RandomDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeOrderedLong(long offset, long i)
writeOrderedLong in interface RandomDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeFloat(long offset, float d)
writeFloat in interface RandomDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeDouble(long offset, double d)
writeDouble in interface RandomDataOutput<Bytes<Underlying>>public Bytes<Underlying> write(long offsetInRDO, byte[] bytes, int offset, int length)
write in interface RandomDataOutput<Bytes<Underlying>>public void write(long offsetInRDO,
ByteBuffer bytes,
int offset,
int length)
write in interface RandomDataOutput<Bytes<Underlying>>public Bytes<Underlying> write(long offsetInRDO, RandomDataInput bytes, long offset, long length)
write in interface RandomDataOutput<Bytes<Underlying>>public byte readByte(long offset)
readByte in interface RandomDataInputpublic short readShort(long offset)
readShort in interface RandomDataInputpublic int readInt(long offset)
readInt in interface RandomDataInputpublic long readLong(long offset)
readLong in interface RandomDataInputpublic float readFloat(long offset)
readFloat in interface RandomDataInputpublic double readDouble(long offset)
readDouble in interface RandomDataInputpublic Bytes<Underlying> writeByte(byte i8)
writeByte in interface StreamingDataOutput<Bytes<Underlying>>protected long writeOffsetPositionMoved(long adding)
public Bytes<Underlying> writeShort(short i16)
writeShort in interface StreamingDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeInt(int i)
writeInt in interface StreamingDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeLong(long i64)
writeLong in interface StreamingDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeFloat(float f)
writeFloat in interface StreamingDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeDouble(double d)
writeDouble in interface StreamingDataOutput<Bytes<Underlying>>public Bytes<Underlying> write(byte[] bytes, int offset, int length)
write in interface StreamingDataOutput<Bytes<Underlying>>public Bytes<Underlying> write(ByteBuffer buffer)
write in interface StreamingDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeOrderedInt(int i)
writeOrderedInt in interface StreamingDataOutput<Bytes<Underlying>>public Bytes<Underlying> writeOrderedLong(long i)
writeOrderedLong in interface StreamingDataOutput<Bytes<Underlying>>public long address(long offset)
throws UnsupportedOperationException
offset - within this buffer. address(start()) is the actual address of the first byte.UnsupportedOperationException - if the underlying buffer is on the heappublic boolean equalsBytes(Bytes b2, long remaining)
@NotNull public String toString()
toString in interface CharSequencetoString in class Objectprotected void finalize()
throws Throwable
public void nativeRead(long address,
long size)
StreamingDataInputnativeRead in interface StreamingDataInput<Bytes<Underlying>>address - of the memory.size - in bytes.public void nativeWrite(long address,
long size)
StreamingDataOutputnativeWrite in interface StreamingDataOutput<Bytes<Underlying>>address - to write to.size - in bytes.public void nativeRead(long position,
long address,
long size)
RandomDataInputnativeRead in interface RandomDataInputposition - within the ByteStore to copy.address - in native memorysize - in bytespublic void nativeWrite(long address,
long position,
long size)
RandomDataOutputnativeWrite in interface RandomDataOutput<Bytes<Underlying>>address - in native memory to copy fromposition - in BytesStore to copy tosize - in bytespublic BytesStore bytesStore()
bytesStore in interface BytesStore<Bytes<Underlying>,Underlying>public String parseUTF(StopCharTester stopCharTester)
public void parseUTF(Appendable sb, StopCharTester stopCharTester)
public void parseUTF(Appendable sb, StopCharsTester stopCharsTester)
public void parse8bit(Appendable sb, StopCharsTester stopCharsTester)
public long parseLong()
public double parseDouble()
public boolean skipTo(StopCharTester tester)
public long readRemaining()
public long writeRemaining()
public ByteOrder byteOrder()
Copyright © 2015. All rights reserved.