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) |
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) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitallocateDirect, allocateElasticDirect, allocateElasticDirect, 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, writeUnsignedShortchars, 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Δ@Nullable protected BytesStore<Bytes<Underlying>,Underlying> bytesStore
protected long readPosition
protected long writePosition
protected long writeLimit
@NotNull 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>realCapacity in interface RandomDataInputpublic long capacity()
capacity in interface BytesStore<Bytes<Underlying>,Underlying>@Nullable 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.ReferenceCounted@NotNull public Bytes<Underlying> writeByte(long offset, byte i)
writeByte in interface RandomDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeShort(long offset, short i)
writeShort in interface RandomDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeInt(long offset, int i)
writeInt in interface RandomDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeOrderedInt(long offset, int i)
writeOrderedInt in interface RandomDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeLong(long offset, long i)
writeLong in interface RandomDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeOrderedLong(long offset, long i)
writeOrderedLong in interface RandomDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeFloat(long offset, float d)
writeFloat in interface RandomDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeDouble(long offset, double d)
writeDouble in interface RandomDataOutput<Bytes<Underlying>>@NotNull 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>>@NotNull 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 RandomDataInput@NotNull public Bytes<Underlying> writeByte(byte i8)
writeByte in interface StreamingDataOutput<Bytes<Underlying>>protected long writeOffsetPositionMoved(long adding)
@NotNull public Bytes<Underlying> writeShort(short i16)
writeShort in interface StreamingDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeInt(int i)
writeInt in interface StreamingDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeLong(long i64)
writeLong in interface StreamingDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeFloat(float f)
writeFloat in interface StreamingDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeDouble(double d)
writeDouble in interface StreamingDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> write(byte[] bytes, int offset, int length)
write in interface StreamingDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> write(@NotNull ByteBuffer buffer)
write in interface StreamingDataOutput<Bytes<Underlying>>@NotNull public Bytes<Underlying> writeOrderedInt(int i)
writeOrderedInt in interface StreamingDataOutput<Bytes<Underlying>>@NotNull 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(@NotNull
Bytes b2,
long remaining)
@NotNull public String toString()
toString in interface CharSequencetoString in class Objectpublic 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 bytes@Nullable public BytesStore bytesStore()
bytesStore in interface BytesStore<Bytes<Underlying>,Underlying>@NotNull public String parseUTF(@NotNull StopCharTester stopCharTester)
public void parseUTF(@NotNull
Appendable sb,
@NotNull
StopCharTester stopCharTester)
public void parseUTF(@NotNull
Appendable sb,
@NotNull
StopCharsTester stopCharsTester)
public void parse8bit(Appendable sb, @NotNull StopCharsTester stopCharsTester)
public long parseLong()
public double parseDouble()
public boolean skipTo(@NotNull
StopCharTester tester)
public long readRemaining()
public long writeRemaining()
public ByteOrder byteOrder()
Copyright © 2015. All rights reserved.