Buffers.
Buffer
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Appender | |
| private static final Appender | |
| public static final Buffer | |
| public static final ByteBuffer | |
| public static final ByteBuffer[] | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Buffer | Returns: the result of appending of twoBuffers.the memoryManager, final Buffer MemoryManager to use if a new Buffer needs to be allocated in order to
perform the requested operation.the buffer1, final Buffer Buffer to append to.the buffer2)Buffer to append.Append two |
| public static Buffer | Returns: the result of appending of twoBuffers.the memoryManager, final Buffer MemoryManager to use if a new Buffer needs to be allocated in order to
perform the requested operation.the buffer1, final Buffer Buffer to append to.the buffer2, final boolean Buffer to append.flag indicating whether or not the resulting composite buffer may be disposed. isCompositeBufferDisposable)Append two |
| public static Buffer | Returns: the clonedBuffer.the source srcBuffer)Buffer.Clones the source |
| public static Buffer | Returns: the clonedBuffer.the source srcBuffer, final int Buffer.the start position in the srcBuffer position, final int the end position in the srcBuffer limit)Clones the source |
| public static void | dumpBuffer(final Appendable
the appendable, final Buffer Appendable to write the hex dump to.the buffer)Buffer to dump.Generates a hex dump of the provided |
| private static void | |
| private static void | |
| public static void | |
| public static void | |
| public static void | fill(final ByteBuffer byteBuffer, final byte
value b)Fill the |
| public static void | fill(final ByteBuffer byteBuffer, final int
ByteBuffer position to start with (inclusive)Buffer limit, where filling ends (exclusive)value b)Fill the |
| public static void | |
| public static Appender | getBufferAppender(final boolean
if as the result of isCompositeBufferDisposable)Buffers appending a new CompositeBuffer will
be created - its CompositeBuffer#allowBufferDispose(boolean) value will be set according to this parameter. |
| private static char | |
| private static MemoryManager | |
| public static void | |
| public static void | |
| public static void | |
| public static long | Returns: the number of bytes read, or -1 if the end of file is reached.the fileChannel, final Buffer FileChannel to read data from.the destination buffer)Buffer.Reads data from the |
| public static void | |
| public static void | |
| public static ByteBuffer | Returns: slicedByteBuffer of required size.big chunk, final int ByteBuffer pool.required slice size. size)Slice |
| public static ByteBuffer | Returns: slicedByteBuffer of required size.ByteBuffer to slice/the position in the passed byteBuffer, the slice will start from. position, final int the limit in the passed byteBuffer, the slice will be ended. limit)Get the |
| public static String | |
| public String | toStringContent(final Buffer
the buffer, final int Buffer, could be nullthe number of heading bytes to include (larger or equal to 0) headBytesCount, final int the number of tailing bytes to include (larger or equal to 0) tailBytesCount)Returns the HeapBuffer (1781633478) [pos=0 lim=285 cap=285][abcde...xyz] |
| public String | toStringContent(final Buffer
the buffer, final int Buffer, could be nullthe number of heading bytes to include (larger or equal to 0) headBytesCount, final int the number of tailing bytes to include (larger or equal to 0) tailBytesCount, final Charset Charset, if null the Charset#defaultCharset() will be usedReturns the HeapBuffer (1781633478) [pos=0 lim=285 cap=285][abcde...xyz] |
| public static Buffer | wrap(final MemoryManager<E extends Buffer>
MemoryManager, which should be used for wrapping. |
| public static Buffer | wrap(final MemoryManager<E extends Buffer>
MemoryManager, which should be used for wrapping.Returns |
| public static Buffer | Returns: Buffer wrapper on top of passed byte array.MemoryManager, which should be used for wrapping.byte array to wrap. array)Returns |
| public static Buffer | Returns: Buffer wrapper on top of passed byte array.MemoryManager, which should be used for wrapping.byte array to wrap array, final int byte buffer offset offset, final int byte buffer length length)Returns |
| public static Buffer | wrap(final MemoryManager<E extends Buffer>
MemoryManager, which should be used for wrapping.ByteBuffer to wrapReturns |
| public static long | Returns: the number of bytes written, possibly zero.the fileChannel, final Buffer FileChannel to write data to.the source buffer)Buffer.Writes data from the |
| APPENDER_DISPOSABLE | back to summary |
|---|---|
| private static final Appender<Buffer> APPENDER_DISPOSABLE | |
| APPENDER_NOT_DISPOSABLE | back to summary |
|---|---|
| private static final Appender<Buffer> APPENDER_NOT_DISPOSABLE | |
| EMPTY_BUFFER | back to summary |
|---|---|
| public static final Buffer EMPTY_BUFFER | |
| EMPTY_BYTE_BUFFER | back to summary |
|---|---|
| public static final ByteBuffer EMPTY_BYTE_BUFFER | |
| EMPTY_BYTE_BUFFER_ARRAY | back to summary |
|---|---|
public static final ByteBuffer[] EMPTY_BYTE_BUFFER_ARRAY
| |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| Buffers | back to summary |
|---|---|
| public Buffers() | |
| appendBuffers | back to summary |
|---|---|
| public static Buffer appendBuffers(final MemoryManager<E extends Buffer> memoryManager, final Buffer buffer1, final Buffer buffer2) Append two
| |
| appendBuffers | back to summary |
|---|---|
| public static Buffer appendBuffers(final MemoryManager<E extends Buffer> memoryManager, final Buffer buffer1, final Buffer buffer2, final boolean isCompositeBufferDisposable) Append two
| |
| cloneBuffer | back to summary |
|---|---|
| public static Buffer cloneBuffer(final Buffer srcBuffer) Clones the source | |
| cloneBuffer | back to summary |
|---|---|
| public static Buffer cloneBuffer(final Buffer srcBuffer, final int position, final int limit) Clones the source | |
| dumpBuffer | back to summary |
|---|---|
| public static void dumpBuffer(final Appendable appendable, final Buffer buffer) Generates a hex dump of the provided
| |
| dumpBuffer0 | back to summary |
|---|---|
private static void dumpBuffer0(final Formatter formatter, final Appendable appendable, final Buffer buffer)
| |
| dumpBuffer0 | back to summary |
|---|---|
| private static void dumpBuffer0(final Formatter formatter, final Buffer buffer) | |
| fill | back to summary |
|---|---|
| public static void fill(final Buffer buffer, final byte b) Fill the | |
| fill | back to summary |
|---|---|
| public static void fill(final Buffer buffer, final int position, final int limit, final byte b) Fill the | |
| fill | back to summary |
|---|---|
| public static void fill(final ByteBuffer byteBuffer, final byte b) Fill the
| |
| fill | back to summary |
|---|---|
| public static void fill(final ByteBuffer byteBuffer, final int position, final int limit, final byte b) Fill the
| |
| get | back to summary |
|---|---|
| public static void get(final ByteBuffer srcBuffer, final byte[] dstBytes, final int dstOffset, final int length) | |
| getBufferAppender | back to summary |
|---|---|
| public static Appender Get the
| |
| getChar | back to summary |
|---|---|
| private static char getChar(final int val) | |
| getDefaultMemoryManager | back to summary |
|---|---|
| private static MemoryManager | |
| put | back to summary |
|---|---|
| public static void put(final ByteBuffer srcBuffer, final int srcOffset, final int length, final ByteBuffer dstBuffer) | |
| put | back to summary |
|---|---|
| public static void put(final Buffer src, final int position, final int length, final Buffer dstBuffer) | |
| put | back to summary |
|---|---|
| public static void put(final byte[] srcBytes, final int srcOffset, final int length, final ByteBuffer dstBuffer) | |
| readFromFileChannel | back to summary |
|---|---|
| public static long readFromFileChannel(final FileChannel fileChannel, final Buffer buffer) throws IOException Reads data from the
| |
| setPositionLimit | back to summary |
|---|---|
| public static void setPositionLimit(final Buffer buffer, final int position, final int limit) | |
| setPositionLimit | back to summary |
|---|---|
| public static void setPositionLimit(final ByteBuffer buffer, final int position, final int limit) | |
| slice | back to summary |
|---|---|
| public static ByteBuffer slice(final ByteBuffer chunk, final int size) Slice
| |
| slice | back to summary |
|---|---|
| public static ByteBuffer slice(final ByteBuffer byteBuffer, final int position, final int limit) Get the
| |
| toStringContent | back to summary |
|---|---|
| public static String toStringContent(final ByteBuffer byteBuffer, Charset charset, final int position, final int limit) | |
| toStringContent | back to summary |
|---|---|
| public String toStringContent(final Buffer buffer, final int headBytesCount, final int tailBytesCount) Returns the | |
| toStringContent | back to summary |
|---|---|
| public String toStringContent(final Buffer buffer, final int headBytesCount, final int tailBytesCount, final Charset charset) Returns the the the number of heading bytes to include (larger or equal to 0)
the number of tailing bytes to include (larger or equal to 0)
the | |
| wrap | back to summary |
|---|---|
| public static Buffer wrap(final MemoryManager<E extends Buffer> memoryManager, final String s) Returns
| |
| wrap | back to summary |
|---|---|
| public static Buffer wrap(final MemoryManager<E extends Buffer> memoryManager, final String s, final Charset charset) Returns | |
| wrap | back to summary |
|---|---|
| public static Buffer wrap(final MemoryManager<E extends Buffer> memoryManager, final byte[] array) Returns
| |
| wrap | back to summary |
|---|---|
| public static Buffer wrap(MemoryManager<E extends Buffer> memoryManager, final byte[] array, final int offset, final int length) Returns
| |
| wrap | back to summary |
|---|---|
| public static Buffer wrap(final MemoryManager<E extends Buffer> memoryManager, final ByteBuffer byteBuffer) Returns
| |
| writeToFileChannel | back to summary |
|---|---|
| public static long writeToFileChannel(final FileChannel fileChannel, final Buffer buffer) throws IOException Writes data from the
| |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Buffer | append(final Buffer element1, final Buffer element2)
Implements org.
|
| isCompositeBufferDisposable | back to summary |
|---|---|
| private final boolean isCompositeBufferDisposable | |
| BuffersAppender | back to summary |
|---|---|
| public BuffersAppender(boolean isCompositeBufferDisposable) | |
| append | back to summary |
|---|---|
| public Buffer append(final Buffer element1, final Buffer element2) Implements org.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final String[] |
| Access | Constructor and Description |
|---|---|
| private |
| DUMP_STRINGS | back to summary |
|---|---|
| private static final String[] DUMP_STRINGS | |
| DumpStrings | back to summary |
|---|---|
| private DumpStrings() | |