public final class PrintBufferUtil extends Object
DirectBuffer
.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 buffer.public static String hexDump(DirectBuffer buffer, int fromIndex, int length)
buffer
- dumped buffer.fromIndex
- where should we start to print.length
- how much should we print.public static String hexDump(byte[] array)
array
- dumped array.public static String hexDump(byte[] array, int fromIndex, int length)
array
- dumped array.fromIndex
- where should we start to print.length
- how much should we print.public static String prettyHexDump(DirectBuffer buffer)
DirectBuffer
that is easy to read by humans.buffer
- dumped buffer.public 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 buffer.offset
- where should we start to print.length
- how much should we print.public 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 buffer.buffer
- dumped buffer.public 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 buffer.buffer
- dumped buffer.offset
- where should we start to print.length
- how much should we print.public static String byteToHexStringPadded(int value)
value
- converted value.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.