public class PrintBufferUtil extends Object
DirectBuffer
.Constructor and Description |
---|
PrintBufferUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
appendPrettyHexDump(StringBuilder dump,
DirectBuffer buffer)
Appends the prettified multi-line hexadecimal dump of the specified
DirectBuffer to the specified
StringBuilder that is easy to read by humans. |
static void |
appendPrettyHexDump(StringBuilder dump,
DirectBuffer buffer,
int offset,
int length)
Appends the prettified multi-line hexadecimal dump of the specified
DirectBuffer to the specified
StringBuilder that is easy to read by humans, starting at the given offset using
the given length . |
static String |
byteToHexStringPadded(int value)
Converts the specified byte value into a 2-digit hexadecimal integer.
|
static String |
hexDump(byte[] array)
Returns a hex dump
of the specified byte array.
|
static String |
hexDump(byte[] array,
int fromIndex,
int length)
Returns a hex dump
of the specified byte array's sub-region.
|
static String |
hexDump(DirectBuffer buffer)
Returns a hex dump
of the specified buffer's readable bytes.
|
static String |
hexDump(DirectBuffer buffer,
int fromIndex,
int length)
Returns a hex dump
of the specified buffer's sub-region.
|
static String |
prettyHexDump(DirectBuffer buffer)
Returns a hexadecimal dump of the specified
DirectBuffer that is easy to read by humans. |
static String |
prettyHexDump(DirectBuffer buffer,
int offset,
int length)
Returns a hexadecimal dump of the specified
DirectBuffer that is easy to read by humans,
starting at the given offset using the given length . |
public static String hexDump(DirectBuffer buffer)
buffer
- dumped bufferpublic static String hexDump(DirectBuffer buffer, int fromIndex, int length)
buffer
- dumped bufferfromIndex
- where should we start to printlength
- how much should we printpublic static String hexDump(byte[] array)
array
- dumped arraypublic static String hexDump(byte[] array, int fromIndex, int length)
array
- dumped arrayfromIndex
- where should we start to printlength
- how much should we printpublic static String prettyHexDump(DirectBuffer buffer)
DirectBuffer
that is easy to read by humans.buffer
- dumped bufferpublic static String prettyHexDump(DirectBuffer buffer, int offset, int length)
DirectBuffer
that is easy to read by humans,
starting at the given offset
using the given length
.buffer
- dumped bufferoffset
- where should we start to printlength
- how much should we printpublic static void appendPrettyHexDump(StringBuilder dump, DirectBuffer buffer)
DirectBuffer
to the specified
StringBuilder
that is easy to read by humans.dump
- where should we append string representation of the bufferbuffer
- dumped bufferpublic static void appendPrettyHexDump(StringBuilder dump, DirectBuffer buffer, int offset, int length)
DirectBuffer
to the specified
StringBuilder
that is easy to read by humans, starting at the given offset
using
the given length
.dump
- where should we append string representation of the bufferbuffer
- dumped bufferoffset
- where should we start to printlength
- how much should we printpublic static String byteToHexStringPadded(int value)
value
- converted valueCopyright © 2014-2019 Real Logic Ltd. All Rights Reserved.