ByteBuf,
such as the generation of hex dump and swapping an integer's byte order.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final FastThreadLocal | |
| pack-priv static final ByteBufAllocator | |
| private static final ByteProcessor | FIND_NON_ASCII
Aborts on a byte which is not a valid ASCII character. |
| private static final InternalLogger | |
| private static final int | |
| private static final int | |
| pack-priv static final int | |
| private static final int | |
| pack-priv static final int | |
| private static final byte |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | appendPrettyHexDump(StringBuilder dump, ByteBuf buf)
Appends the prettified multi-line hexadecimal dump of the specified |
| public static void | appendPrettyHexDump(StringBuilder dump, ByteBuf buf, int offset, int length)
Appends the prettified multi-line hexadecimal dump of the specified |
| private static CharSequence | |
| public static int | compare(ByteBuf bufferA, ByteBuf bufferB)
Compares the two specified buffers as described in |
| private static long | compareUintBigEndian(ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement)
|
| private static long | compareUintBigEndianA(ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement)
|
| private static long | compareUintBigEndianB(ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement)
|
| private static long | compareUintLittleEndian(ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement)
|
| public static void | copy(AsciiString
the source string to copy src, ByteBuf the destination buffer dst)Copies the all content of |
| public static void | copy(AsciiString
the source string to copy src, int the starting offset of characters to copy srcIdx, ByteBuf the destination buffer dst, int the starting offset in the destination buffer dstIdx, int the number of characters to copy length)Copies the content of |
| public static void | copy(AsciiString
the source string to copy src, int the starting offset of characters to copy srcIdx, ByteBuf the destination buffer dst, int the number of characters to copy length)Copies the content of |
| public static byte | |
| public static byte[] | |
| public static byte[] | decodeHexDump(CharSequence hexDump, int fromIndex, int length)
Decodes part of a string generated by |
| pack-priv static String | |
| public static ByteBuf | encodeString(ByteBufAllocator alloc, CharBuffer src, Charset charset)
Encode the given |
| public static ByteBuf | encodeString(ByteBufAllocator
The alloc, CharBuffer ByteBufAllocator to allocate ByteBuf.The src, Charset CharBuffer to encode.The specified charset, int Charset.the extra capacity to alloc except the space for decoding. extraCapacity)Encode the given |
| pack-priv static ByteBuf | encodeString0(ByteBufAllocator alloc, boolean enforceHeap, CharBuffer src, Charset charset, int extraCapacity)
|
| public static ByteBuf | |
| public static boolean | Returns: true if ensureWritableResult means that there is adequate space and a write operation
will succeed.The return value from ensureWritableResult)ByteBuf#ensureWritable(int, boolean).Used to determine if the return value of |
| public static boolean | |
| public static boolean | equals(ByteBuf bufferA, ByteBuf bufferB)
Returns |
| pack-priv static int | firstIndexOf(AbstractByteBuf buffer, int fromIndex, int toIndex, byte value)
This is using a SWAR (SIMD Within A Register) batch read technique to minimize bound-checks and improve memory
usage while searching for |
| public static byte[] | |
| public static byte[] | |
| public static byte[] | |
| private static void | |
| public static int | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static int | |
| public static int | indexOf(ByteBuf buffer, int fromIndex, int toIndex, byte value)
The default implementation of |
| public static boolean | |
| private static boolean | |
| public static boolean | |
| public static boolean | isText(ByteBuf
The given buf, int ByteBuf.The start index of the specified buffer. index, int The length of the specified buffer. length, Charset The specified charset)Charset.Returns |
| private static boolean | |
| pack-priv static int | |
| private static int | |
| private static long | |
| public static String | prettyHexDump(ByteBuf buffer)
Returns a multi-line hexadecimal dump of the specified |
| public static String | prettyHexDump(ByteBuf buffer, int offset, int length)
Returns a multi-line hexadecimal dump of the specified |
| public static ByteBuf | readBytes(ByteBufAllocator alloc, ByteBuf buffer, int length)
Read the given amount of bytes into a new |
| pack-priv static void | readBytes(ByteBufAllocator allocator, ByteBuffer buffer, int position, int length, OutputStream out)
Read bytes from the given |
| public static int | |
| public static int | |
| public static int | reserveAndWriteUtf8(ByteBuf buf, CharSequence seq, int reserveBytes)
Encode a |
| public static int | Returns: actual number of bytes writtenEquivalent to |
| private static int | |
| private static int | |
| private static int | |
| private static int | |
| public static void | setLeakListener(ResourceLeakDetector.
If leakListener is not null, it will be notified once a ByteBuf leak is detected. leakListenerSet |
| public static ByteBuf | setShortBE(ByteBuf buf, int index, int shortValue)
Sets a big-endian 16-bit short integer to the buffer. |
| public static int | |
| public static long | |
| public static int | |
| public static short | |
| public static ByteBuf | Returns: a cached thread-local direct buffer, if available.null otherwise.Returns a cached thread-local direct buffer, if available. |
| pack-priv static byte[] | threadLocalTempArray(int minLength)
Allocates a new array if minLength > |
| private static long | |
| private static int | |
| private static int | unsafeWriteUtf8(byte[] buffer, long memoryOffset, int writerIndex, CharSequence seq, int start, int end)
|
| private static int | |
| public static int | |
| public static int | utf8Bytes(final CharSequence seq, int start, int end)
Equivalent to |
| private static int | |
| public static int | utf8MaxBytes(final int seqLength)
Returns max bytes length of UTF8 character sequence of the given length. |
| public static int | |
| public static ByteBuf | writeAscii(ByteBufAllocator
The allocator used to allocate a new alloc, CharSequence ByteBuf.The characters to write into a buffer. seq)Encode a |
| public static int | |
| pack-priv static int | |
| private static int | |
| pack-priv static void | |
| public static ByteBuf | |
| public static ByteBuf | |
| public static ByteBuf | writeUtf8(ByteBufAllocator
The allocator used to allocate a new alloc, CharSequence ByteBuf.The characters to write into a buffer. seq)Encode a |
| public static int | |
| public static int | writeUtf8(ByteBuf buf, CharSequence seq, int start, int end)
Equivalent to |
| pack-priv static int | |
| pack-priv static int | writeUtf8(AbstractByteBuf buffer, int writerIndex, int reservedBytes, CharSequence seq, int start, int end)
|