| Modifier and Type | Class and Description |
|---|---|
| private static class | Buffers.
References Deprecated
Pool is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private static class | Buffers.
References Deprecated
Pooled is deprecated or references (maybe indirectly) at least one deprecated element.
|
| Modifier and Type | Field and Description |
|---|---|
| public static final ByteBuffer | EMPTY_BYTE_BUFFER
The empty byte buffer. |
| public static final Pooled | EMPTY_POOLED_BYTE_BUFFER
References Deprecated
The empty pooled byte buffer.
Pooled is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private static final byte[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | addRandom(ByteBuffer
the target buffer target, Random the RNG random, int the number of bytes to add count)Add |
| public static void | addRandom(ByteBuffer
the target buffer target, int the number of bytes to add count)Add |
| public static void | addRandom(ByteBuffer
the target buffer target, Random the RNG random)Add a random amount of random data to the target buffer. |
| public static void | addRandom(ByteBuffer
the target buffer target)Add a random amount of random data to the target buffer using the thread-local RNG. |
| public static < the buffer type B extends Buffer> Pool | Returns: the buffer poolthe buffer allocator allocator, final int the buffer size size)
References Deprecated
Pool is deprecated or references (maybe indirectly) at least one deprecated element.
A buffer pool which allocates a new buffer on every allocate request, and discards buffers on free. |
| private static void | |
| private static void | |
| private static void | appendTextRow(final ByteBuffer buffer, final Appendable dest, final int startPos, final int columns)
|
| private static void | appendTextRow(final CharBuffer buffer, final Appendable dest, final int startPos, final int columns)
|
| public static void | assertWritable(Buffer[]
the buffers array buffers, int the offset in the array to start searching offs, int the number of buffers to check len)Assert the writability of the given buffers. |
| public static void | |
| public static < the buffer type T extends Buffer> T | |
| public static ByteBuffer | Returns: the buffer slicethe buffer to slice buffer, int the size of the copy count, BufferAllocator<ByteBuffer> the buffer allocator to use allocator)Copy a portion of the buffer into a newly allocated buffer. |
| public static int | Returns: the number of bytes put into the destination bufferthe destination buffer destination, final ByteBuffer the source buffer source)Copy as many bytes as possible from |
| public static int | Returns: the number of bytes put into the destination buffersthe destination buffers destinations, final int the offset into the destination buffers array offset, final int the number of buffers to update length, final ByteBuffer the source buffer source)Copy as many bytes as possible from |
| public static int | Returns: the number of bytes put into the destination buffersthe destination buffer destination, final ByteBuffer[] the source buffers sources, final int the offset into the source buffers array offset, final int the number of buffers to read from length)Copy as many bytes as possible from |
| public static long | Returns: the number of bytes put into the destination buffersthe destination buffers destinations, final int the offset into the destination buffers array destOffset, final int the number of buffers to write to destLength, final ByteBuffer[] the source buffers sources, final int the offset into the source buffers array srcOffset, final int the number of buffers to read from srcLength)Copy as many bytes as possible from |
| public static int | Returns: the number of bytes put into the destination bufferthe maximum number of bytes to copy count, final ByteBuffer the destination buffer destination, final ByteBuffer the source buffer source)Copy at most |
| public static int | Returns: the number of bytes put into the destination buffersthe maximum number of bytes to copy count, final ByteBuffer[] the destination buffers destinations, final int the offset into the destination buffers array offset, final int the number of buffers to update length, final ByteBuffer the source buffer source)Copy at most |
| public static int | Returns: the number of bytes put into the destination buffersthe maximum number of bytes to copy count, final ByteBuffer the destination buffer destination, final ByteBuffer[] the source buffers sources, final int the offset into the source buffers array offset, final int the number of buffers to read from length)Copy at most |
| public static long | Returns: the number of bytes put into the destination buffersthe maximum number of bytes to copy count, final ByteBuffer[] the destination buffers destinations, final int the offset into the destination buffers array destOffset, final int the number of buffers to write to destLength, final ByteBuffer[] the source buffers sources, final int the offset into the source buffers array srcOffset, final int the number of buffers to read from srcLength)Copy at most |
| public static Object | Returns: a stringable objectthe buffer buffer, final int the indentation to use indent, final int the number of 8-byte columns columns)Create an object that returns the dumped form of the given byte buffer when its |
| public static Object | Returns: a stringable objectthe buffer buffer, final int the indentation to use indent, final int the number of 8-byte columns columns)Create an object that returns the dumped form of the given character buffer when its |
| public static String | Returns: the stringthe buffer to describe buffer)Get a debug-friendly description of the buffer. |
| public static String | Returns: the stringthe buffers to describe buffers, int the offset into the array offs, int the number of buffers len)Get a debug-friendly description of the buffer. |
| public static void | dump(final ByteBuffer
the buffer buffer, final Appendable the target dest, final int the indentation to use indent, final int the number of 8-byte columns columns)Dump a byte buffer to the given target. |
| public static void | dump(final CharBuffer
the buffer buffer, final Appendable the target dest, final int the indentation to use indent, final int the number of 8-byte columns columns)Dump a character buffer to the given target. |
| public static Pooled | Returns: a new pooled empty buffer
References Deprecated
Pooled is deprecated or references (maybe indirectly) at least one deprecated element.
Create a "pooled" empty buffer. |
| public static void | emptyToStream(OutputStream
the target stream target, ByteBuffer the source buffer source)Empty a buffer to an output stream. |
| public static ByteBuffer | Returns: the buffer instancethe buffer to fill buffer, int the value to fill value, int the number of bytes to fill count)Fill a buffer with a repeated value. |
| public static CharBuffer | Returns: the buffer instancethe buffer to fill buffer, int the value to fill value, int the number of chars to fill count)Fill a buffer with a repeated value. |
| public static ShortBuffer | Returns: the buffer instancethe buffer to fill buffer, int the value to fill value, int the number of shorts to fill count)Fill a buffer with a repeated value. |
| public static IntBuffer | |
| public static LongBuffer | Returns: the buffer instancethe buffer to fill buffer, long the value to fill value, int the number of longs to fill count)Fill a buffer with a repeated value. |
| public static int | Returns: the number of bytes transferred, or-1 if no bytes were moved due to end-of-streamthe target buffer target, InputStream the source stream source)Fill a buffer from an input stream. |
| public static < the buffer type T extends Buffer> T | |
| public static String | Returns: the modified UTF-8 stringthe buffer src)Get a modified UTF-8 string from the remainder of the buffer. |
| public static String | Returns: the stringthe source buffer src)Get a 0-terminated string from the byte buffer, decoding it using "modified UTF-8" encoding. |
| public static Pooled | Returns: the pooled wrapperthe buffer to wrap buffer)
References Deprecated
Pooled is deprecated or references (maybe indirectly) at least one deprecated element.
Create a pooled wrapper around a buffer that was allocated via |
| public static boolean | Returns: true if any of the selected buffers has remaining datathe buffers buffers, final int the offset into the buffers array offs, final int the number of buffers to check len)Determine whether any of the buffers has remaining data. |
| public static boolean | Returns: true if any of the selected buffers has remaining datathe buffers buffers)Determine whether any of the buffers has remaining data. |
| public static boolean | |
| public static boolean | |
| public static boolean | Returns: true if it is a secure pool instancethe pool to test pool)
References Deprecated
Pool is deprecated or references (maybe indirectly) at least one deprecated element.
Determine whether the given pool is a secure pool. |
| public static < the buffer type T extends Buffer> T | Returns: the buffer instancethe buffer to set buffer, int the new limit limit)Set the buffer limit. |
| public static < the buffer type T extends Buffer> T | |
| public static < the buffer type B extends Buffer> Pooled | Returns: the pooled wrapperthe buffer to wrap buffer)
References Deprecated
Pooled is deprecated or references (maybe indirectly) at least one deprecated element.
Create a pooled wrapper around a buffer. |
| public static < the buffer type T extends Buffer> T | Returns: the buffer instancethe buffer to set buffer, int the new position position)Set the buffer position. |
| public static ByteBuffer | Returns: the byte bufferthe byte buffer dest, String the source bytes orig)Put the string into the byte buffer, encoding it using "modified UTF-8" encoding. |
| public static void | readAscii(final ByteBuffer
the source buffer src, final StringBuilder the destination builder builder)Read the remainder of a buffer as ASCII text, appending the results to the given string builder. |
| public static void | readAscii(final ByteBuffer
the source buffer src, final StringBuilder the destination builder builder, final char the replacement character for invalid bytes replacement)Read the remainder of a buffer as ASCII text, appending the results to the given string builder. |
| public static void | readAscii(final ByteBuffer
the source buffer src, final StringBuilder the destination builder builder, int the maximum number of characters to write limit, final char the replacement character for invalid bytes replacement)Read the remainder of a buffer as ASCII text, up to a certain limit, appending the results to the given string builder. |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder)Read a single line of ASCII text from a byte buffer, appending the results to the given string builder. |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder, final char the replacement character for invalid bytes replacement)Read a single line of ASCII text from a byte buffer, appending the results to the given string builder. |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder, final char the replacement character for invalid bytes replacement, final char the character which marks the end of the line delimiter)Read a single line of ASCII text from a byte buffer, appending the results to the given string
builder, using the given delimiter character instead of |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder)Read an ASCIIZ ( |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder, final char the replacement character for invalid bytes replacement)Read an ASCIIZ ( |
| public static void | readLatin1(final ByteBuffer
the source buffer src, final StringBuilder the destination builder builder)Read the remainder of a buffer as Latin-1 text, appending the results to the given string builder. |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder)Read a single line of Latin-1 text from a byte buffer, appending the results to the given string builder. |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder, final char the character which marks the end of the line delimiter)Read a single line of Latin-1 text from a byte buffer, appending the results to the given string builder. |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder)Read a |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder, final CharsetDecoder the decoder to use decoder)Read a single line of text from a byte buffer, appending the results to the given string builder. |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder, final CharsetDecoder the decoder to use decoder, final char the character which marks the end of the line delimiter)Read a single line of text from a byte buffer, appending the results to the given string builder. |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder)Read a single line of |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder, final char the replacement character for invalid bytes replacement)Read a single line of |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder, final char the replacement character for invalid bytes replacement, final char the character which marks the end of the line delimiter)Read a single line of |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder)Read a |
| public static boolean | Returns: true if the entire string was read, false if more data is neededthe source buffer src, final StringBuilder the destination builder builder, final char the replacement character to use replacement)Read a |
| private static int | |
| public static long | |
| public static long | |
| public static < the buffer type T extends Buffer> T | |
| public static < the buffer type T extends Buffer> T | |
| public static Pool | Returns: the wrapper poolthe delegate pool delegate)
References Deprecated
Pool is deprecated or references (maybe indirectly) at least one deprecated element.
A byte buffer pool which zeroes the content of the buffer before re-pooling it. |
| public static < the buffer type T extends Buffer> T | Returns: the buffer instancethe buffer to set buffer, int the distance to skip cnt)Advance a buffer's position relative to its current position. |
| public static ByteBuffer | Returns: the buffer slicethe buffer to slice buffer, int the size of the slice sliceSize)Slice the buffer. |
| public static CharBuffer | Returns: the buffer slicethe buffer to slice buffer, int the size of the slice sliceSize)Slice the buffer. |
| public static ShortBuffer | Returns: the buffer slicethe buffer to slice buffer, int the size of the slice sliceSize)Slice the buffer. |
| public static IntBuffer | |
| public static LongBuffer | Returns: the buffer slicethe buffer to slice buffer, int the size of the slice sliceSize)Slice the buffer. |
| public static BufferAllocator | Returns: the slice allocatorthe source buffer buffer)A buffer allocator which allocates slices off of the given buffer. |
| public static byte[] | Returns: the bytesthe buffer to read buffer, int the number of bytes to take cnt)Take a certain number of bytes from the buffer and return them in an array. |
| public static char[] | Returns: the charsthe buffer to read buffer, int the number of chars to take cnt)Take a certain number of chars from the buffer and return them in an array. |
| public static short[] | Returns: the shortsthe buffer to read buffer, int the number of shorts to take cnt)Take a certain number of shorts from the buffer and return them in an array. |
| public static int[] | |
| public static long[] | Returns: the longsthe buffer to read buffer, int the number of longs to take cnt)Take a certain number of longs from the buffer and return them in an array. |
| public static byte[] | Returns: the bytesthe buffer to read buffer)Take all of the remaining bytes from the buffer and return them in an array. |
| public static byte[] | Returns: the bytesthe buffer to read buffers, final int the offset into the array offs, final int the number of buffers len)Take all of the remaining bytes from the buffers and return them in an array. |
| public static char[] | Returns: the charsthe buffer to read buffer)Take all of the remaining chars from the buffer and return them in an array. |
| public static short[] | Returns: the shortsthe buffer to read buffer)Take all of the remaining shorts from the buffer and return them in an array. |
| public static int[] | |
| public static long[] | Returns: the longsthe buffer to read buffer)Take all of the remaining longs from the buffer and return them in an array. |
| public static int | |
| public static long | |
| public static < the buffer type T extends Buffer> T | Returns: the buffer instancethe buffer to set buffer, int the distance to skip backwards cnt)Rewind a buffer's position relative to its current position. |
| public static void | |
| public static void |