| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | |
| private long | |
| private Object | |
| private long | |
| private static final boolean | BYTES_BEFORE_USE_LITTLE_ENDIAN
Most deployment platforms support unaligned access, and are little-endian. |
| private static final int | |
| private static final boolean | |
| private int | |
| private UnsafeMemory | |
| private boolean | |
| private int | |
| private int | |
| private static final Unsafe | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv | UnsafeBuffer(UnsafeMemory memory, long offset, int size, AllocatorControl control, Drop<UnsafeBuffer> drop)
|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public long | baseNativeAddress()
Implements io. |
| private BufferClosedException | |
| public int | bytesBefore(byte
The byte value to search for. needle)Implements io. needle is found in this
buffer.
|
| public int | bytesBefore(Buffer
The buffer value to search for. needle)Implements io. needle is found in this
buffer.
|
| public int | capacity()
Implements io. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public Buffer | compact()
Implements io. |
| public Buffer | copy(int
The offset where copying should start from. This is the offset of the first byte copied. offset, int The number of bytes to copy, and the capacity of the returned buffer. length, boolean The desired readOnly)readOnly() state of the returned buffer.Implements io. |
| public void | copyInto(int
The byte offset into this buffer from where the copying should start; the byte at this offset in
this buffer will be copied to the srcPos, byte[] destPos index in the dest array.The destination byte array. dest, int The index into the destPos, int dest array from where the copying should start.The number of bytes to copy. length)Implements io. |
| public void | copyInto(int
The byte offset into this buffer from where the copying should start; the byte at this offset in
this buffer will be copied to the srcPos, ByteBuffer destPos index in the dest ByteBuffer.The destination byte buffer. dest, int The index into the destPos, int dest ByteBuffer from where the copying should start.The number of bytes to copy. length)Implements io. |
| public void | copyInto(int
The byte offset into this buffer from where the copying should start; the byte at this offset in
this buffer will be copied to the srcPos, Buffer destPos index in the dest buffer.The destination buffer. dest, int The index into the destPos, int dest buffer from where the copying should start.The number of bytes to copy. length)Implements io. |
| private void | |
| public int | countComponents()
Implements io. |
| public int | countReadableComponents()
Implements io. |
| public int | countWritableComponents()
Implements io. |
| protected RuntimeException | |
| private Drop | |
| public Buffer | ensureWritable(int
The requested number of bytes of space that should be available for writing. size, int The minimum number of bytes to grow by. If it is determined that memory should be allocated
and copied, make sure that the new memory allocation is bigger than the old one by at least
this many bytes. This way, the buffer can grow by more than what is immediately necessary,
thus amortising the costs of allocating and copying. minimumGrowth, boolean allowCompaction)Implements io. |
| public Buffer | fill(byte
The byte value to write at every offset in the buffer. value)Implements io. |
| public UnsafeBuffer | first()
Implements io. null if there are no components.
|
| public <T extends BufferComponent & ComponentIterator. | forEachComponent()
Implements io. |
| public byte | getByte(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| public char | getChar(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| public double | getDouble(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| public float | getFloat(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| public int | getInt(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| public long | getLong(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| public int | getMedium(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| public short | getShort(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| public int | getUnsignedByte(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| public long | getUnsignedInt(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| public int | getUnsignedMedium(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| public int | getUnsignedShort(int
The read offset, an absolute offset into this buffer, to read from. roff)Implements io. |
| private void | |
| public boolean | hasReadableArray()
Implements io. |
| public boolean | hasWritableArray()
Implements io. |
| public Buffer | implicitCapacityLimit(int
The maximum size this buffers capacity will implicitly grow to via limit)write* methods.Implements io. |
| public int | implicitCapacityLimit()
Implements io. |
| public boolean | isDirect()
Implements io. |
| private byte | |
| private char | |
| private char | |
| private double | |
| private double | |
| private float | |
| private float | |
| private int | |
| private int | |
| private long | |
| private long | |
| private short | |
| private short | |
| protected void | makeInaccessible()
Overrides io. |
| public Buffer | |
| public ByteBuffer | mutableReadableBuffer()
Implements io. ByteBuffer instance for this memory component.
|
| private long | |
| pack-priv UnsafeBuffer | |
| public <N extends ComponentIterator. | next()
Implements io. null if there are no more components.
|
| public ByteCursor | openCursor()
Implements io. |
| public ByteCursor | openCursor(int
The offset into the buffer where iteration should start.
The first byte read from the iterator will be the byte at this offset. fromOffset, int The number of bytes to iterate. length)Implements io. |
| public ByteCursor | openReverseCursor(int
The offset into the buffer where iteration should start.
The first byte read from the iterator will be the byte at this offset. fromOffset, int The number of bytes to iterate. length)Implements io. |
| private IndexOutOfBoundsException | |
| protected Owned | prepareSend()
Implements abstract io. |
| public byte[] | readableArray()
Implements io. |
| public int | readableArrayLength()
Implements io. readableArray() that belong to this component.
|
| public int | readableArrayOffset()
Implements io. readableArray() where this component starts.
|
| public ByteBuffer | readableBuffer()
Implements io. ByteBuffer instance for this memory component.
|
| public int | readableBytes()
Overrides default io. Implements io. |
| public long | readableNativeAddress()
Implements io. |
| private RuntimeException | |
| public byte | readByte()
Implements io. Buffer#readerOffset(),
and increases the reader offset by Byte#BYTES.
|
| public char | readChar()
Implements io. Buffer#readerOffset(),
and increases the reader offset by 2.
|
| public double | readDouble()
Implements io. Buffer#readerOffset(),
and increases the reader offset by Double#BYTES.
|
| public int | |
| public Buffer | readerOffset(int
The reader offset to set. offset)Implements io. |
| public float | readFloat()
Implements io. Buffer#readerOffset(),
and increases the reader offset by Float#BYTES.
|
| public int | readInt()
Implements io. Buffer#readerOffset(),
and increases the reader offset by Integer#BYTES.
|
| public long | readLong()
Implements io. Buffer#readerOffset(),
and increases the reader offset by Long#BYTES.
|
| public int | readMedium()
Implements io. Buffer#readerOffset(),
and increases the reader offset by 3.
|
| public boolean | |
| public short | readShort()
Implements io. Buffer#readerOffset(),
and increases the reader offset by Short#BYTES.
|
| public int | readUnsignedByte()
Implements io. Buffer#readerOffset(),
and increases the reader offset by Byte#BYTES.
|
| public long | readUnsignedInt()
Implements io. Buffer#readerOffset(),
and increases the reader offset by Integer#BYTES.
|
| public int | readUnsignedMedium()
Implements io. Buffer#readerOffset(),
and increases the reader offset by 3.
|
| public int | readUnsignedShort()
Implements io. Buffer#readerOffset(),
and increases the reader offset by Short#BYTES.
|
| pack-priv Object | |
| public Buffer | setByte(int
The write offset, an absolute offset into this buffer to write to. woff, byte The byte value to write. value)Implements io. |
| public Buffer | setChar(int
The write offset, an absolute offset into this buffer to write to. woff, char The char value to write. value)Implements io. |
| public Buffer | setDouble(int
The write offset, an absolute offset into this buffer to write to. woff, double The double value to write. value)Implements io. |
| public Buffer | setFloat(int
The write offset, an absolute offset into this buffer to write to. woff, float The float value to write. value)Implements io. |
| public Buffer | setInt(int
The write offset, an absolute offset into this buffer to write to. woff, int The int value to write. value)Implements io. |
| public Buffer | setLong(int
The write offset, an absolute offset into this buffer to write to. woff, long The long value to write. value)Implements io. |
| public Buffer | setMedium(int
The write offset, an absolute offset into this buffer to write to. woff, int The int value to write. value)Implements io. |
| public Buffer | setShort(int
The write offset, an absolute offset into this buffer to write to. woff, short The short value to write. value)Implements io. |
| public Buffer | setUnsignedByte(int
The write offset, an absolute offset into this buffer to write to. woff, int The int value to write. value)Implements io. |
| public Buffer | setUnsignedInt(int
The write offset, an absolute offset into this buffer to write to. woff, long The long value to write. value)Implements io. |
| public Buffer | setUnsignedMedium(int
The write offset, an absolute offset into this buffer to write to. woff, int The int value to write. value)Implements io. |
| public Buffer | setUnsignedShort(int
The write offset, an absolute offset into this buffer to write to. woff, int The int value to write. value)Implements io. |
| public UnsafeBuffer | skipReadableBytes(int
The number of bytes read from this component. delta)Overrides default io. Implements io. |
| public UnsafeBuffer | skipWritableBytes(int
The number of bytes written to this component. delta)Overrides default io. Implements io. |
| public Buffer | split(int
The offset into this buffer where it should be split. After the split, the data at this offset
will be at offset zero in this buffer. splitOffset)Implements io. splitOffset.
|
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public String | |
| public int | transferFrom(FileChannel
The channel to read from. channel, long The file position. position, int The maximum number of bytes to read. length)Implements io. |
| public int | transferFrom(ReadableByteChannel
The channel to read from. channel, int The maximum number of bytes to read. length)Implements io. |
| public int | transferTo(WritableByteChannel
The channel to write to. channel, int The maximum number of bytes to write. length)Implements io. |
| private static byte | |
| public byte[] | writableArray()
Implements io. |
| public int | writableArrayLength()
Implements io. writableArray() that belong to this component.
|
| public int | writableArrayOffset()
Implements io. writableArray() where this component starts.
|
| public ByteBuffer | writableBuffer()
Implements io. ByteBuffer instance for this memory component, which can be used for modifying the buffer
contents.
|
| public int | writableBytes()
Overrides default io. Implements io. |
| public long | writableNativeAddress()
Implements io. |
| public Buffer | writeByte(byte
The byte value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Byte#BYTES.
|
| public Buffer | writeChar(char
The char value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by 2.
|
| public Buffer | writeDouble(double
The double value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Double#BYTES.
|
| public Buffer | writeFloat(float
The float value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Float#BYTES.
|
| public Buffer | writeInt(int
The int value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Integer#BYTES.
|
| public Buffer | writeLong(long
The long value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Long#BYTES.
|
| public Buffer | writeMedium(int
The int value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by 3.
|
| public int | |
| public Buffer | writerOffset(int
The writer offset to set. offset)Implements io. |
| public Buffer | writeShort(short
The short value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Short#BYTES.
|
| public Buffer | writeUnsignedByte(int
The int value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Byte#BYTES.
|
| public Buffer | writeUnsignedInt(long
The long value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Integer#BYTES.
|
| public Buffer | writeUnsignedMedium(int
The int value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by 3.
|
| public Buffer | writeUnsignedShort(int
The int value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Short#BYTES.
|