Example usage for Java io.netty.buffer ByteBufUtil fields, constructors, methods, implement or subclass
The text is from its open source code.
void | appendPrettyHexDump(StringBuilder dump, ByteBuf buf) Appends the prettified multi-line hexadecimal dump of the specified ByteBuf to the specified StringBuilder that is easy to read by humans. |
int | compare(ByteBuf bufferA, ByteBuf bufferB) Compares the two specified buffers as described in ByteBuf#compareTo(ByteBuf) . |
void | copy(AsciiString src, int srcIdx, ByteBuf dst, int dstIdx, int length) Copies the content of src to a ByteBuf using ByteBuf#setBytes(int,byte[],int,int) . |
byte[] | decodeHexDump(CharSequence hexDump) Decodes a string generated by #hexDump(byte[]) |
ByteBuf | encodeString(ByteBufAllocator alloc, CharBuffer src, Charset charset) Encode the given CharBuffer using the given Charset into a new ByteBuf which is allocated via the ByteBufAllocator . |
boolean | equals(ByteBuf bufferA, ByteBuf bufferB) Returns true if and only if the two specified buffers are identical to each other as described in ByteBuf#equals(Object) . |
boolean | equals(ByteBuf a, int aStartIndex, ByteBuf b, int bStartIndex, int length) Returns true if and only if the two specified buffers are identical to each other for length bytes starting at aStartIndex index for the a buffer and bStartIndex index for the b buffer. |
byte[] | getBytes(ByteBuf buf) Create a copy of the underlying storage from buf into a byte array. |
byte[] | getBytes(ByteBuf buf, int start, int length) Create a copy of the underlying storage from buf into a byte array. |
byte[] | getBytes(ByteBuf buf, int start, int length, boolean copy) Return an array of the underlying storage from buf into a byte array. |
int | hashCode(ByteBuf buffer) Calculates the hash code of the specified buffer. |
String | hexDump(ByteBuf buffer) Returns a hex dump of the specified buffer's readable bytes. |
String | hexDump(byte[] array) Returns a hex dump of the specified byte array. |
String | hexDump(ByteBuf buffer, int fromIndex, int length) Returns a hex dump of the specified buffer's sub-region. |
String | hexDump(byte[] array, int fromIndex, int length) Returns a hex dump of the specified byte array's sub-region. |
int | indexOf(ByteBuf buffer, int fromIndex, int toIndex, byte value) The default implementation of ByteBuf#indexOf(int,int,byte) . |
int | indexOf(ByteBuf needle, ByteBuf haystack) Returns the reader index of needle in haystack, or -1 if needle is not in haystack. |
String | prettyHexDump(ByteBuf buffer) Returns a multi-line hexadecimal dump of the specified ByteBuf that is easy to read by humans. |
int | reserveAndWriteUtf8(ByteBuf buf, CharSequence seq, int reserveBytes) Encode a CharSequence in UTF-8 and write it into reserveBytes of a ByteBuf . |
int | swapInt(int value) Toggles the endianness of the specified 32-bit integer. |
long | swapLong(long value) Toggles the endianness of the specified 64-bit long integer. |
int | utf8Bytes(final CharSequence seq) Returns the exact bytes length of UTF8 character sequence. |
int | utf8MaxBytes(final int seqLength) Returns max bytes length of UTF8 character sequence of the given length. |
int | utf8MaxBytes(CharSequence seq) Returns max bytes length of UTF8 character sequence. |
ByteBuf | writeAscii(ByteBufAllocator alloc, CharSequence seq) Encode a CharSequence in ASCII and write it to a ByteBuf allocated with alloc . |
int | writeAscii(ByteBuf buf, CharSequence seq) Encode a CharSequence in ASCII and write it to a ByteBuf . |
ByteBuf | writeUtf8(ByteBufAllocator alloc, CharSequence seq) Encode a CharSequence in UTF-8 and write it to a ByteBuf allocated with alloc . |
int | writeUtf8(ByteBuf buf, CharSequence seq) Encode a CharSequence in UTF-8 and write it to a ByteBuf . |