Class PrintBufferUtil.HexUtil
java.lang.Object
org.agrona.PrintBufferUtil.HexUtil
- Enclosing class:
PrintBufferUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidappendHexDumpRowPrefix(StringBuilder dump, int row, int rowStartIndex) (package private) static voidappendPrettyHexDump(StringBuilder dump, DirectBuffer buffer, int offset, int length) (package private) static shortgetUnsignedByte(DirectBuffer buffer, int index) Gets an unsigned byte at the specified absoluteindexin a buffer.(package private) static StringhexDump(byte[] array, int fromIndex, int length) (package private) static StringhexDump(DirectBuffer buffer, int fromIndex, int length) (package private) static booleanisOutOfBounds(int index, int length, int capacity) Determine if the requestedindexandlengthwill fit withincapacity.(package private) static StringprettyHexDump(DirectBuffer buffer, int offset, int length)
-
Field Details
-
BYTE2CHAR
private static final char[] BYTE2CHAR -
HEXDUMP_TABLE
private static final char[] HEXDUMP_TABLE -
HEX_PADDING
-
HEXDUMP_ROW_PREFIXES
-
BYTE2HEX
-
BYTE_PADDING
-
-
Constructor Details
-
HexUtil
HexUtil()
-
-
Method Details
-
getUnsignedByte
Gets an unsigned byte at the specified absoluteindexin a buffer.- Parameters:
buffer- the source of value.index- the absoluteindexin the buffer.- Returns:
- unsigned byte value.
-
hexDump
-
hexDump
-
prettyHexDump
-
isOutOfBounds
static boolean isOutOfBounds(int index, int length, int capacity) Determine if the requestedindexandlengthwill fit withincapacity.- Parameters:
index- The starting index.length- The length which will be utilized (starting fromindex).capacity- The capacity thatindex + lengthis allowed to be within.- Returns:
trueif the requestedindexandlengthwill fit withincapacity.falseif this would result in an index out of bounds exception.
-
appendPrettyHexDump
-
appendHexDumpRowPrefix
-