Class IoBufferHexDumper
java.lang.Object
org.apache.mina.core.buffer.IoBufferHexDumper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetHexDumpSlice(IoBuffer buf, int offset, int length) Dumps anIoBufferto a hex formatted string.static final StringgetPrettyHexDumpSlice(IoBuffer buf, int offset, int length) Produces a verbose hex dumpstatic final StringtoHex(byte b) static final StringtoPrettyHexDump(byte[] data, int pos, int len) Generates a hex dump with line numbers, hex, volumes, and ascii representationprivate static final StringtoPrettyHexDumpLine(byte[] data, int pos, int len, int col, int line) Generates the hex dump line with hex values, columns, and ascii representation
-
Field Details
-
hexDigit
private static final char[] hexDigit
-
-
Constructor Details
-
IoBufferHexDumper
IoBufferHexDumper()
-
-
Method Details
-
getHexDumpSlice
-
getPrettyHexDumpSlice
-
toPrettyHexDump
Generates a hex dump with line numbers, hex, volumes, and ascii representation- Parameters:
data- source data to read for the hex dumppos- index position to begin readinglen- number of bytes to read- Returns:
- string hex dump
-
toPrettyHexDumpLine
Generates the hex dump line with hex values, columns, and ascii representation- Parameters:
data- source data to read for the hex dumppos- index position to begin readinglen- number of bytes to read; this can be less than thelinewidthcol- number of bytes in a columnline- line width in bytes which pads the output iflenis less thanline- Returns:
- string hex dump
-
toHex
-