public class HexDump
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
maxDump
Max bytes to dump
|
private java.util.function.Consumer<java.lang.String> |
out
Dump consumer
|
Constructor and Description |
---|
HexDump(java.util.function.Consumer<java.lang.String> out,
int maxDump)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
dump(java.lang.String msg,
java.nio.ByteBuffer buf,
boolean flip)
Dump ByteBuffer content
|
static void |
dump(java.lang.String msg,
java.nio.ByteBuffer buf,
boolean flip,
java.util.function.Consumer<java.lang.String> out)
Dump ByteBuffer content
|
static void |
dump(java.lang.String msg,
java.nio.ByteBuffer buf,
boolean flip,
java.util.function.Consumer<java.lang.String> out,
int maxDump)
Dump ByteBuffer content
|
static void |
main(java.lang.String... args)
Test
|
private final int maxDump
private final java.util.function.Consumer<java.lang.String> out
public HexDump(java.util.function.Consumer<java.lang.String> out, int maxDump)
out
- dump consumermaxDump
- max bytes to dumppublic static void dump(java.lang.String msg, java.nio.ByteBuffer buf, boolean flip, java.util.function.Consumer<java.lang.String> out)
msg
- headerbuf
- buffer to be dumpedflip
- flip before dumpout
- dump consumerpublic static void dump(java.lang.String msg, java.nio.ByteBuffer buf, boolean flip, java.util.function.Consumer<java.lang.String> out, int maxDump)
msg
- headerbuf
- buffer to be dumpedflip
- flip before dumpout
- dump consumermaxDump
- max bytes to dumppublic void dump(java.lang.String msg, java.nio.ByteBuffer buf, boolean flip)
msg
- headerbuf
- buffer to be dumpedflip
- flip before dumppublic static void main(java.lang.String... args)
args
- command line arguments