CompositeBuffer interface.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static interface | |
| private static class | |
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final BufferAllocator | |
| private Buffer[] | |
| private int | |
| private boolean | |
| private static final Drop | |
| private static final Buffer[] | |
| private static final int | FIRST_AUTOMATIC_COMPONENT_SIZE
The various write*() methods may automatically grow the buffer, if there is not enough capacity to service the write operation. |
| private int | |
| private int[] | |
| private boolean | |
| private int | |
| private int | |
| private final DefaultCompositeBuffer. | |
| private int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| private CompositeBuffer | |
| 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 BufferAccessor | |
| private BufferAccessor | |
| public CompositeBuffer | compact()
Implements io. |
| public static CompositeBuffer | |
| public static CompositeBuffer | compose(BufferAllocator
The allocator for the composite buffer. This allocator will be used e.g. to service
allocator)
Create an empty composite buffer, that has no components.
ensureWritable(int) calls. |
| private void | |
| public CompositeBuffer | 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. |
| private void | |
| 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 static int | |
| public int | countComponents()
Implements io. |
| public int | countReadableComponents()
Implements io. |
| public int | countWritableComponents()
Implements io. |
| protected RuntimeException | |
| public Buffer[] | decomposeBuffer()
Implements io. |
| public CompositeBuffer | 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 boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public CompositeBuffer | extendWith(Send<Buffer>
The buffer to extend the composite buffer with. extension)Implements io. |
| public CompositeBuffer | fill(byte
The byte value to write at every offset in the buffer. value)Implements io. |
| private static Buffer[] | |
| 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. |
| pack-priv long | |
| 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. |
| public int | |
| public CompositeBuffer | implicitCapacityLimit(int
The maximum size this buffers capacity will implicitly grow to via limit)write* methods.Implements io. |
| public int | implicitCapacityLimit()
Implements io. |
| private RuntimeException | |
| public boolean | isDirect()
Implements io. |
| protected boolean | isOwned()
Overrides io. |
| protected void | makeInaccessible()
Overrides io. |
| public CompositeBuffer | makeReadOnly()
Implements io. |
| 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. |
| protected Owned | prepareSend()
Implements abstract io. |
| private BufferAccessor | |
| private BufferAccessor | |
| private BufferAccessor | |
| private BufferAccessor | |
| private BufferAccessor | |
| 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 CompositeBuffer | readerOffset(int
The reader offset to set. index)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 | |
| pack-priv long | |
| 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.
|
| private int | |
| public CompositeBuffer | 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 CompositeBuffer | 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 CompositeBuffer | 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 CompositeBuffer | 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 CompositeBuffer | 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 CompositeBuffer | 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 CompositeBuffer | setMedium(int
The write offset, an absolute offset into this buffer to write to. woff, int The int value to write. value)Implements io. |
| pack-priv void | |
| public CompositeBuffer | 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 CompositeBuffer | 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 CompositeBuffer | 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 CompositeBuffer | 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 CompositeBuffer | 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 CompositeBuffer | split()
Overrides default io. |
| public CompositeBuffer | 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.
|
| public CompositeBuffer | splitComponentsCeil(int
The minimum split offset. The real split offset will be at a component boundary that is
greater than or equal to this offset. splitOffset)Implements io. |
| public CompositeBuffer | splitComponentsFloor(int
The maximum split offset. The real split offset will be at a component boundary that is less
than or equal to this offset. splitOffset)Implements io. |
| public String | |
| public CompositeBuffer | touch(Object
An optional hint about this access and its context. May be hint)null.Overrides io. Overrides default io. |
| 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 void | |
| public CompositeBuffer | writeByte(byte
The byte value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Byte#BYTES.
|
| public CompositeBuffer | writeChar(char
The char value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by 2.
|
| public CompositeBuffer | writeDouble(double
The double value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Double#BYTES.
|
| public CompositeBuffer | writeFloat(float
The float value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Float#BYTES.
|
| public CompositeBuffer | writeInt(int
The int value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Integer#BYTES.
|
| public CompositeBuffer | writeLong(long
The long value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Long#BYTES.
|
| public CompositeBuffer | writeMedium(int
The int value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by 3.
|
| pack-priv void | |
| public int | |
| public CompositeBuffer | writerOffset(int
The writer offset to set. index)Implements io. |
| public CompositeBuffer | writeShort(short
The short value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Short#BYTES.
|
| public CompositeBuffer | writeUnsignedByte(int
The int value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Byte#BYTES.
|
| public CompositeBuffer | writeUnsignedInt(long
The long value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Integer#BYTES.
|
| public CompositeBuffer | writeUnsignedMedium(int
The int value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by 3.
|
| public CompositeBuffer | writeUnsignedShort(int
The int value to write. value)Implements io. Buffer#writerOffset(),
and increase the writer offset by Short#BYTES.
|