Java io.netty.buffer ByteBufUtil fields, constructors, methods, implement or subclass

Example usage for Java io.netty.buffer ByteBufUtil fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for io.netty.buffer ByteBufUtil.

The text is from its open source code.

Method

voidappendPrettyHexDump(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.
intcompare(ByteBuf bufferA, ByteBuf bufferB)
Compares the two specified buffers as described in ByteBuf#compareTo(ByteBuf) .
voidcopy(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[])
ByteBufencodeString(ByteBufAllocator alloc, CharBuffer src, Charset charset)
Encode the given CharBuffer using the given Charset into a new ByteBuf which is allocated via the ByteBufAllocator .
booleanequals(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) .
booleanequals(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.
inthashCode(ByteBuf buffer)
Calculates the hash code of the specified buffer.
StringhexDump(ByteBuf buffer)
Returns a hex dump of the specified buffer's readable bytes.
StringhexDump(byte[] array)
Returns a hex dump of the specified byte array.
StringhexDump(ByteBuf buffer, int fromIndex, int length)
Returns a hex dump of the specified buffer's sub-region.
StringhexDump(byte[] array, int fromIndex, int length)
Returns a hex dump of the specified byte array's sub-region.
intindexOf(ByteBuf buffer, int fromIndex, int toIndex, byte value)
The default implementation of ByteBuf#indexOf(int,int,byte) .
intindexOf(ByteBuf needle, ByteBuf haystack)
Returns the reader index of needle in haystack, or -1 if needle is not in haystack.
StringprettyHexDump(ByteBuf buffer)
Returns a multi-line hexadecimal dump of the specified ByteBuf that is easy to read by humans.
intreserveAndWriteUtf8(ByteBuf buf, CharSequence seq, int reserveBytes)
Encode a CharSequence in UTF-8 and write it into reserveBytes of a ByteBuf .
intswapInt(int value)
Toggles the endianness of the specified 32-bit integer.
longswapLong(long value)
Toggles the endianness of the specified 64-bit long integer.
intutf8Bytes(final CharSequence seq)
Returns the exact bytes length of UTF8 character sequence.
intutf8MaxBytes(final int seqLength)
Returns max bytes length of UTF8 character sequence of the given length.
intutf8MaxBytes(CharSequence seq)
Returns max bytes length of UTF8 character sequence.
ByteBufwriteAscii(ByteBufAllocator alloc, CharSequence seq)
Encode a CharSequence in ASCII and write it to a ByteBuf allocated with alloc .
intwriteAscii(ByteBuf buf, CharSequence seq)
Encode a CharSequence in ASCII and write it to a ByteBuf .
ByteBufwriteUtf8(ByteBufAllocator alloc, CharSequence seq)
Encode a CharSequence in UTF-8 and write it to a ByteBuf allocated with alloc .
intwriteUtf8(ByteBuf buf, CharSequence seq)
Encode a CharSequence in UTF-8 and write it to a ByteBuf .