public class ByteBufferDumper extends Object
ByteBuffer
Constructor and Description |
---|
ByteBufferDumper() |
Modifier and Type | Method and Description |
---|---|
static String |
dump(ByteBuffer buffer)
Dumps the given buffer.
|
static String |
dump(ByteBuffer buffer,
int nbBytes,
boolean toAscii)
Dump the content of the given ByteBuffer, up to a number of bytes.
|
static ByteBuffer |
fromHexString(String hex) |
static String |
toHex(ByteBuffer buffer)
Dump a byte buffer remaining bytes as a hex-decimal string.
|
public static String dump(ByteBuffer buffer, int nbBytes, boolean toAscii)
true
, this method will try to convert the bytes to a Stringbuffer
- The buffer to dumpnbBytes
- The number of bytes to dump (-1 for all of them)toAscii
- If we want to write the message as a Stringpublic static String dump(ByteBuffer buffer)
buffer
- The buffer to dumppublic static String toHex(ByteBuffer buffer)
buffer
- the buffer to dumppublic static ByteBuffer fromHexString(String hex)
Copyright © 2009–2013 Apache MINA Project. All rights reserved.