All methods in this class will make use of sun. if it's available, for performance. If Unsafe is not available, the fallback
implementations make use of reflection and, in the worst-case, JNI.
Method names in this class are prefixed with mem to avoid ambiguities when used with static imports.
The codec implementations do no codepoint validation, for improved performance. Therefore, if malformed input or unmappable characters are expected, the
JDK CharsetEncoder/CharsetDecoder classes should be used instead. Methods in bindings that accept/return CharSequence/String
also support ByteBuffer, so custom codecs can be used if necessary.
Configuration#MEMORY_ALLOCATOR, Configuration#DEBUG_MEMORY_ALLOCATOR
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| public static interface | MemoryUtil.
The memory allocation report callback. |
| public static interface | MemoryUtil.
The interface implemented by the memory allocator used by the explicit memory management API ( |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| pack-priv static final ThreadLocal | |
| pack-priv static final ThreadLocal | |
| pack-priv static final int | |
| pack-priv static final Class | |
| pack-priv static final Class | |
| pack-priv static final Class | |
| pack-priv static final Class | |
| pack-priv static final Class | |
| pack-priv static final Class | |
| pack-priv static final Class | |
| public static final int | CACHE_LINE_SIZE
The cache-line size, in bytes. |
| private static final long | |
| private static final int | |
| private static final long | |
| private static final long | |
| private static final int | |
| private static final int | |
| private static final long | |
| pack-priv static final ByteOrder | |
| public static final long | NULL
Alias for the null pointer address. |
| public static final int | PAGE_SIZE
The memory page size, in bytes. |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| pack-priv static final Unsafe | |
| private static final Charset |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static long | |
| pack-priv static <T extends Buffer> T | |
| pack-priv static int | |
| pack-priv static int | |
| pack-priv static int | |
| pack-priv static int | |
| private static long | |
| private static long | |
| public static MemoryUtil. | Returns: theMemoryAllocator instanceReturns the |
| public static MemoryUtil. | Returns: theMemoryAllocator instancewhether allocations will be tracked for memory leaks, if tracked)Configuration#DEBUG_MEMORY_ALLOCATOR is enabled.Returns the |
| private static long | |
| private static long | |
| private static long | |
| private static long | |
| private static long | |
| private static long | |
| private static long | |
| private static Unsafe | |
| public static long | Returns: the memory addressthe buffer buffer)Returns the memory address at the current position of the specified buffer. |
| public static long | Returns: the memory addressthe buffer buffer, int the buffer position position)Returns the memory address at the specified position of the specified buffer. |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | memAddress(CustomBuffer<?> buffer, int position)
CustomBuffer version of |
| public static long | Returns: the memory addressthe buffer buffer)Returns the memory address of the specified buffer. |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static ByteBuffer | memAlignedAlloc(int
the alignment. Must be a power of two value and a multiple of alignment, int sizeof(void *).the number of bytes to allocate. Must be a multiple of size)alignment.The standard C aligned_alloc function. |
| public static void | memAlignedFree(ByteBuffer
the aligned block of memory to free ptr)Frees a block of memory that was allocated with |
| public static ByteBuffer | Returns: on success, a pointer to the memory block allocated by the functionthe size of the memory block to allocate, in bytes. If size)size is zero, the returned pointer shall not be dereferenced.The standard C malloc function. |
| public static CLongBuffer | |
| public static DoubleBuffer | |
| public static FloatBuffer | |
| public static IntBuffer | |
| public static LongBuffer | |
| public static PointerBuffer | memAllocPointer(int
the number of pointer values to allocate. size)PointerBuffer version of |
| public static ShortBuffer | |
| public static ByteBuffer | Returns: the encoded text. The returned buffer must be deallocated manually withmemFree.the text to encode text)Returns a ByteBuffer containing the specified text ASCII encoded and null-terminated. |
| public static ByteBuffer | Returns: the encoded text. The returned buffer must be deallocated manually withmemFree.the text to encode text, boolean if true, the text will be terminated with a '\0'. nullTerminated)Returns a |
| public static int | Returns: the number of bytes of the encoded stringthe text to encode text, boolean if true, the text will be terminated with a '\0' nullTerminated, ByteBuffer the buffer where the encoded text should be stored target)Encodes and optionally null-terminates the specified text using ASCII encoding. |
| public static int | Returns: the number of bytes of the encoded stringthe text to encode text, boolean if true, the text will be terminated with a '\0'. nullTerminated, ByteBuffer target, int the buffer position to which the string will be encoded offset)Encodes and optionally null-terminates the specified text using ASCII encoding. |
| public static String | |
| public static String | |
| public static String | Returns: the decodedStringthe buffer)ByteBuffer to decodeDecodes the bytes with index |
| public static String | Returns: the decodedStringthe buffer, int ByteBuffer to decodethe number of bytes to decode length)Decodes the bytes with index |
| public static String | Returns: the decodedStringthe buffer, int ByteBuffer to decodethe number of bytes to decode length, int the offset at which to start decoding. offset)Decodes the bytes with index |
| public static ByteBuffer | |
| public static ByteBuffer | memASCIISafe(CharSequence text, boolean nullTerminated)
Like |
| public static String | |
| public static String | |
| public static String | |
| public static ByteBuffer | Returns: the new ByteBufferthe starting memory address address, int the buffer capacity capacity)Creates a new direct ByteBuffer that starts at the specified memory address and has the specified capacity. |
| public static ByteBuffer | Returns: theByteBuffer viewthe source buffer buffer)Creates a |
| public static ByteBuffer | Returns: theByteBuffer viewthe source buffer buffer)Creates a |
| public static ByteBuffer | Returns: theByteBuffer viewthe source buffer buffer)Creates a |
| public static ByteBuffer | Returns: theByteBuffer viewthe source buffer buffer)Creates a |
| public static ByteBuffer | Returns: theByteBuffer viewthe source buffer buffer)Creates a |
| public static ByteBuffer | Returns: theByteBuffer viewthe source buffer buffer)Creates a |
| public static ByteBuffer | Returns: theByteBuffer viewthe source buffer buffer)Creates a |
| public static <T extends Struct | Returns: theByteBuffer viewthe struct value value)Creates a |
| public static ByteBuffer | Returns: the new ByteBufferthe starting memory address address)Creates a new direct ByteBuffer that starts at the specified memory address and has capacity equal to the null-terminated string starting at that address. |
| public static ByteBuffer | Returns: the new ByteBufferthe starting memory address address, int the maximum string length, in bytes maxLength)Creates a new direct ByteBuffer that starts at the specified memory address and has capacity equal to the null-terminated string starting at that
address, up to a maximum of |
| public static ByteBuffer | |
| public static ByteBuffer | memByteBufferNT1Safe(long address, int maxLength)
Like |
| public static ByteBuffer | Returns: the new ByteBufferthe starting memory address address)Creates a new direct ByteBuffer that starts at the specified memory address and has capacity equal to the null-terminated string starting at that address. |
| public static ByteBuffer | Returns: the new ByteBufferthe starting memory address address, int maxLength)Creates a new direct ByteBuffer that starts at the specified memory address and has capacity equal to the null-terminated string starting at that
address, up to a maximum of |
| public static ByteBuffer | |
| public static ByteBuffer | memByteBufferNT2Safe(long address, int maxLength)
Like |
| public static ByteBuffer | memByteBufferSafe(long address, int capacity)
Like |
| public static ByteBuffer | Returns: on success, a pointer to the memory block allocated by the functionthe number of elements to allocate. num, int the size of each element. If size)size is zero, the return value depends on the particular library implementation (it may or may not be
a null pointer), but the returned pointer shall not be dereferenced.The standard C calloc function. |
| public static ByteBuffer | |
| public static CLongBuffer | |
| public static DoubleBuffer | |
| public static FloatBuffer | |
| public static IntBuffer | |
| public static LongBuffer | |
| public static PointerBuffer | memCallocPointer(int
the number of pointer values to allocate. num)PointerBuffer version of |
| public static ShortBuffer | |
| public static CharBuffer | Returns: the new CharBufferthe starting memory address address, int the buffer capacity capacity)Creates a new direct CharBuffer that starts at the specified memory address and has the specified capacity. |
| public static CharBuffer | memCharBufferSafe(long address, int capacity)
Like |
| public static CLongBuffer | Returns: the newCLongBufferthe starting memory address address, int the buffer capacity capacity)Creates a new direct |
| public static CLongBuffer | memCLongBufferSafe(long address, int capacity)
Like |
| public static void | memCopy(ByteBuffer
the source memory address src, ByteBuffer the destination memory address dst)Sets all bytes in a specified block of memory to a copy of another block. |
| public static void | memCopy(ShortBuffer
the source memory address src, ShortBuffer the destination memory address dst)Sets all bytes in a specified block of memory to a copy of another block. |
| public static void | memCopy(CharBuffer
the source memory address src, CharBuffer the destination memory address dst)Sets all bytes in a specified block of memory to a copy of another block. |
| public static void | |
| public static void | memCopy(LongBuffer
the source memory address src, LongBuffer the destination memory address dst)Sets all bytes in a specified block of memory to a copy of another block. |
| public static void | memCopy(FloatBuffer
the source memory address src, FloatBuffer the destination memory address dst)Sets all bytes in a specified block of memory to a copy of another block. |
| public static void | memCopy(DoubleBuffer
the source memory address src, DoubleBuffer the destination memory address dst)Sets all bytes in a specified block of memory to a copy of another block. |
| public static < the buffer type T extends CustomBuffer | memCopy(T
the source memory address src, T the destination memory address dst)Sets all bytes in a specified block of memory to a copy of another block. |
| public static < the struct type T extends Struct | memCopy(T
the source struct src, T the destination struct dst)Sets all bytes of a struct to a copy of another struct. |
| public static void | memCopy(long
the source memory address src, long the destination memory address dst, long the number of bytes to copy bytes)Sets all bytes in a specified block of memory to a copy of another block. |
| pack-priv static void | |
| pack-priv static void | |
| public static DoubleBuffer | Returns: the new DoubleBufferthe starting memory address address, int the buffer capacity capacity)Creates a new direct DoubleBuffer that starts at the specified memory address and has the specified capacity. |
| public static DoubleBuffer | memDoubleBufferSafe(long address, int capacity)
Like |
| public static ByteBuffer | Returns: the duplicated bufferthe buffer to duplicate buffer)Duplicates the specified buffer. |
| public static ShortBuffer | Returns: the duplicated bufferthe buffer to duplicate buffer)Duplicates the specified buffer. |
| public static CharBuffer | Returns: the duplicated bufferthe buffer to duplicate buffer)Duplicates the specified buffer. |
| public static IntBuffer | Returns: the duplicated bufferthe buffer to duplicate buffer)Duplicates the specified buffer. |
| public static LongBuffer | Returns: the duplicated bufferthe buffer to duplicate buffer)Duplicates the specified buffer. |
| public static FloatBuffer | Returns: the duplicated bufferthe buffer to duplicate buffer)Duplicates the specified buffer. |
| public static DoubleBuffer | Returns: the duplicated bufferthe buffer to duplicate buffer)Duplicates the specified buffer. |
| public static FloatBuffer | Returns: the new FloatBufferthe starting memory address address, int the buffer capacity capacity)Creates a new direct FloatBuffer that starts at the specified memory address and has the specified capacity. |
| public static FloatBuffer | memFloatBufferSafe(long address, int capacity)
Like |
| public static void | |
| public static void | |
| public static long | |
| public static boolean | |
| public static byte | |
| public static long | |
| public static double | |
| public static float | |
| public static int | |
| public static long | |
| public static short | |
| public static native < the object type T> T | Returns: the object pointed to byglobalRefthe global reference globalRef)Returns the object that the specified global reference points to. |
| public static IntBuffer | Returns: the new IntBufferthe starting memory address address, int the buffer capacity capacity)Creates a new direct IntBuffer that starts at the specified memory address and has the specified capacity. |
| public static IntBuffer | |
| public static int | Returns: the number of bytesthe text to encode value, boolean if true, add the number of bytes required for null-termination nullTerminated)Returns the number of bytes required to encode the specified text in the ASCII encoding. |
| private static int | |
| public static int | Returns: the string length, in bytesthe buffer containing the null-terminated string buffer)Calculates the length, in bytes, of the null-terminated string that starts at the current position of the specified buffer. |
| private static int | |
| public static int | Returns: the string length, in bytesthe buffer containing the null-terminated string buffer)Calculates the length, in bytes, of the null-terminated string that starts at the current position of the specified buffer. |
| public static int | Returns: the number of bytesthe text to encode value, boolean if true, add the number of bytes required for null-termination nullTerminated)Returns the number of bytes required to encode the specified text in the UTF-16 encoding. |
| public static int | Returns: the number of bytesthe text to encode value, boolean if true, add the number of bytes required for null-termination nullTerminated)Returns the number of bytes required to encode the specified text in the UTF-8 encoding. |
| public static LongBuffer | Returns: the new LongBufferthe starting memory address address, int the buffer capacity capacity)Creates a new direct LongBuffer that starts at the specified memory address and has the specified capacity. |
| public static LongBuffer | memLongBufferSafe(long address, int capacity)
Like |
| public static PointerBuffer | Returns: the new PointerBufferthe starting memory address address, int the buffer capacity capacity)Creates a new PointerBuffer that starts at the specified memory address and has the specified capacity. |
| public static PointerBuffer | memPointerBufferSafe(long address, int capacity)
Like |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static ByteBuffer | Returns: a pointer to the reallocated memory block, which may be either the same asptr or a new locationa pointer to a memory block previously allocated with ptr, int memAlloc, memCalloc or memRealloc. Alternatively, this can
be a NULL pointer, in which case a new block is allocated (as if memAlloc was called).the new size for the memory block, in bytes. size)The standard C realloc function. |
| public static ShortBuffer | memRealloc(ShortBuffer ptr, int
the number of short values to allocate. size)ShortBuffer version of |
| public static IntBuffer | memRealloc(IntBuffer ptr, int
the number of int values to allocate. size)IntBuffer version of |
| public static LongBuffer | memRealloc(LongBuffer ptr, int
the number of long values to allocate. size)LongBuffer version of |
| public static CLongBuffer | memRealloc(CLongBuffer ptr, int
the number of C long values to allocate. size)
|
| public static FloatBuffer | memRealloc(FloatBuffer ptr, int
the number of float values to allocate. size)FloatBuffer version of |
| public static DoubleBuffer | memRealloc(DoubleBuffer ptr, int
the number of double values to allocate. size)DoubleBuffer version of |
| public static PointerBuffer | memRealloc(PointerBuffer ptr, int
the number of pointer values to allocate. size)PointerBuffer version of |
| public static void | |
| public static void | memReport(MemoryUtil.
the report callback report,how to aggregate the reported allocations groupByStackTrace,if the reported allocations should be grouped by thread groupByThread)Reports aggregates for the live allocations. |
| public static void | memSet(ByteBuffer
the starting memory address ptr, int the value to set (memSet will convert it to unsigned byte) value)Sets all bytes in a specified block of memory to a fixed value (usually zero). |
| public static void | memSet(ShortBuffer
the starting memory address ptr, int the value to set (memSet will convert it to unsigned byte) value)Sets all bytes in a specified block of memory to a fixed value (usually zero). |
| public static void | memSet(CharBuffer
the starting memory address ptr, int the value to set (memSet will convert it to unsigned byte) value)Sets all bytes in a specified block of memory to a fixed value (usually zero). |
| public static void | |
| public static void | memSet(LongBuffer
the starting memory address ptr, int the value to set (memSet will convert it to unsigned byte) value)Sets all bytes in a specified block of memory to a fixed value (usually zero). |
| public static void | memSet(FloatBuffer
the starting memory address ptr, int the value to set (memSet will convert it to unsigned byte) value)Sets all bytes in a specified block of memory to a fixed value (usually zero). |
| public static void | memSet(DoubleBuffer
the starting memory address ptr, int the value to set (memSet will convert it to unsigned byte) value)Sets all bytes in a specified block of memory to a fixed value (usually zero). |
| public static < the buffer type T extends CustomBuffer | memSet(T
the starting memory address ptr, int the value to set (memSet will convert it to unsigned byte) value)Sets all bytes in a specified block of memory to a fixed value (usually zero). |
| public static < the struct type T extends Struct | memSet(T
the starting memory address ptr, int the value to set (memSet will convert it to unsigned byte) value)Sets all bytes in a specified block of memory to a fixed value (usually zero). |
| public static void | memSet(long
the starting memory address ptr, int the value to set (memSet will convert it to unsigned byte) value, long the number of bytes to set bytes)Sets all bytes in a specified block of memory to a fixed value (usually zero). |
| private static void | |
| private static void | |
| public static ShortBuffer | Returns: the new ShortBufferthe starting memory address address, int the buffer capacity capacity)Creates a new direct ShortBuffer that starts at the specified memory address and has the specified capacity. |
| public static ShortBuffer | memShortBufferSafe(long address, int capacity)
Like |
| public static ByteBuffer | Returns: the sliced bufferthe buffer to slice buffer)Slices the specified buffer. |
| public static ShortBuffer | Returns: the sliced bufferthe buffer to slice buffer)Slices the specified buffer. |
| public static CharBuffer | Returns: the sliced bufferthe buffer to slice buffer)Slices the specified buffer. |
| public static IntBuffer | |
| public static LongBuffer | Returns: the sliced bufferthe buffer to slice buffer)Slices the specified buffer. |
| public static FloatBuffer | Returns: the sliced bufferthe buffer to slice buffer)Slices the specified buffer. |
| public static DoubleBuffer | Returns: the sliced bufferthe buffer to slice buffer)Slices the specified buffer. |
| public static ByteBuffer | Returns: the sliced bufferthe buffer to slice buffer, int the slice offset, it must be ≤ offset, int buffer.remaining()the slice length, it must be ≤ capacity)buffer.capacity() - (buffer.position() + offset)Returns a slice of the specified buffer between |
| public static ShortBuffer | Returns: the sliced bufferthe buffer to slice buffer, int the slice offset, it must be ≤ offset, int buffer.remaining()the slice length, it must be ≤ capacity)buffer.capacity() - (buffer.position() + offset)Returns a slice of the specified buffer between |
| public static CharBuffer | Returns: the sliced bufferthe buffer to slice buffer, int the slice offset, it must be ≤ offset, int buffer.remaining()the slice length, it must be ≤ capacity)buffer.capacity() - (buffer.position() + offset)Returns a slice of the specified buffer between |
| public static IntBuffer | Returns: the sliced bufferthe buffer to slice buffer, int the slice offset, it must be ≤ offset, int buffer.remaining()the slice length, it must be ≤ capacity)buffer.capacity() - (buffer.position() + offset)Returns a slice of the specified buffer between |
| public static LongBuffer | Returns: the sliced bufferthe buffer to slice buffer, int the slice offset, it must be ≤ offset, int buffer.remaining()the slice length, it must be ≤ capacity)buffer.capacity() - (buffer.position() + offset)Returns a slice of the specified buffer between |
| public static FloatBuffer | Returns: the sliced bufferthe buffer to slice buffer, int the slice offset, it must be ≤ offset, int buffer.remaining()the slice length, it must be ≤ capacity)buffer.capacity() - (buffer.position() + offset)Returns a slice of the specified buffer between |
| public static DoubleBuffer | Returns: the sliced bufferthe buffer to slice buffer, int the slice offset, it must be ≤ offset, int buffer.remaining()the slice length, it must be ≤ capacity)buffer.capacity() - (buffer.position() + offset)Returns a slice of the specified buffer between |
| public static <T extends CustomBuffer | Returns: the sliced bufferthe buffer to slice buffer, int the slice offset, it must be ≤ offset, int buffer.remaining()the slice length, it must be ≤ capacity)buffer.capacity() - (buffer.position() + offset)Returns a slice of the specified buffer between |
| public static ByteBuffer | Returns: the encoded text. The returned buffer must be deallocated manually withmemFree.the text to encode text)Returns a ByteBuffer containing the specified text UTF-16 encoded and null-terminated. |
| public static ByteBuffer | Returns: the encoded text. The returned buffer must be deallocated manually withmemFree.the text to encode text, boolean if true, the text will be terminated with a '\0'. nullTerminated)Returns a ByteBuffer containing the specified text UTF-16 encoded and optionally null-terminated. |
| public static int | Returns: the number of bytes of the encoded stringthe text to encode text, boolean if true, the text will be terminated with a '\0'. nullTerminated, ByteBuffer the buffer in which to store the encoded text target)Encodes and optionally null-terminates the specified text using UTF-16 encoding. |
| public static int | Returns: the number of bytes of the encoded stringthe text to encode text, boolean if true, the text will be terminated with a '\0'. nullTerminated, ByteBuffer the buffer in which to store the encoded text target, int the buffer position to which the string will be encoded offset)Encodes and optionally null-terminates the specified text using UTF-16 encoding. |
| public static String | |
| public static String | |
| public static String | Returns: the decodedStringthe buffer)ByteBuffer to decodeDecodes the bytes with index |
| public static String | Returns: the decodedStringthe buffer, int ByteBuffer to decodethe number of characters to decode length)Decodes the bytes with index |
| public static String | Returns: the decodedStringthe buffer, int ByteBuffer to decodethe number of characters to decode length, int the offset at which to start decoding, in bytes. offset)Decodes the bytes with index |
| public static ByteBuffer | |
| public static ByteBuffer | memUTF16Safe(CharSequence text, boolean nullTerminated)
Like |
| public static String | |
| public static String | |
| public static String | |
| public static ByteBuffer | Returns: the encoded text. The returned buffer must be deallocated manually withmemFree.the text to encode text)Returns a ByteBuffer containing the specified text UTF-8 encoded and null-terminated. |
| public static ByteBuffer | Returns: the encoded text. The returned buffer must be deallocated manually withmemFree.the text to encode text, boolean if true, the text will be terminated with a '\0'. nullTerminated)Returns a ByteBuffer containing the specified text UTF-8 encoded and optionally null-terminated. |
| public static int | Returns: the number of bytes of the encoded stringthe text to encode text, boolean if true, the text will be terminated with a '\0'. nullTerminated, ByteBuffer the buffer in which to store the encoded text target)Encodes and optionally null-terminates the specified text using UTF-8 encoding. |
| public static int | Returns: the number of bytes of the encoded stringthe text to encode text, boolean if true, the text will be terminated with a '\0'. nullTerminated, ByteBuffer the buffer in which to store the encoded text target, int the buffer position to which the string will be encoded offset)Encodes and optionally null-terminates the specified text using UTF-8 encoding. |
| public static String | |
| public static String | |
| public static String | Returns: the decodedStringthe buffer)ByteBuffer to decodeDecodes the bytes with index |
| public static String | Returns: the decodedStringthe buffer, int ByteBuffer to decodethe number of bytes to decode length)Decodes the bytes with index |
| public static String | Returns: the decodedStringthe buffer, int ByteBuffer to decodethe number of bytes to decode length, int the offset at which to start decoding. offset)Decodes the bytes with index |
| public static ByteBuffer | |
| public static ByteBuffer | memUTF8Safe(CharSequence text, boolean nullTerminated)
Like |
| public static String | |
| public static String | |
| public static String | |
| public static long | |
| public static long | Returns: a pointer to the memory block allocated by the function on success. This pointer will never beNULL, even if size is zero.Unsafe version of |
| public static void | |
| public static long | |
| public static long | Returns: a pointer to the memory block allocated by the function on success. This pointer will never beNULL, even if size is zero.Unsafe version of |
| public static long | |
| public static long | Returns: a pointer to the memory block allocated by the function on success. This pointer will never beNULL, even if num or
size are zero.Unsafe version of |
| public static void | |
| public static long | |
| public static long | Returns: a pointer to the memory block reallocated by the function on success. This pointer will never beNULL, even if size is zero.Unsafe version of |
| private static <T extends Buffer> T | |
| pack-priv static ByteBuffer | |
| pack-priv static <T extends Buffer> T | |
| private static int | |
| private static int | |
| private static int | |
| private static int | |
| pack-priv static <T extends Buffer> T | |
| private static int | |
| private static int | |
| private static int |