Class Hexdump
java.lang.Object
org.freedesktop.dbus.utils.Hexdump
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringformat(byte[] _buf) static Stringformat(byte[] _buf, int _width) static voidprint(byte[] _buf) static voidprint(byte[] _buf, int _width) static voidprint(byte[] _buf, int _width, PrintStream _out) static voidprint(byte[] _buf, PrintStream _out) static StringtoAscii(byte[] _buf) static StringtoAscii(byte[] _buf, int _ofs, int _len) static StringtoByteArray(byte[] _buf) Returns a string which can be written to a Java source file as part of a static initializer for a byte array.static StringtoByteArray(byte[] _buf, int _ofs, int _len) Returns a string which can be written to a Java source file as part of a static initializer for a byte array.static StringtoHex(byte[] _buf) static StringtoHex(byte[] _buf, boolean _spaces) static StringtoHex(byte[] _buf, int _ofs, int _len, boolean _spaces)
-
Method Details
-
toHex
-
toHex
-
toHex
-
toAscii
-
toAscii
-
format
-
format
-
print
public static void print(byte[] _buf) -
print
public static void print(byte[] _buf, int _width) -
print
-
print
-
toByteArray
Returns a string which can be written to a Java source file as part of a static initializer for a byte array. Returns data in the format 0xAB, 0xCD, .... use like: javafile.print("byte[] data = {") javafile.print(Hexdump.toByteArray(data)); javafile.println("};"); * @param buf- Parameters:
_buf- buffer- Returns:
- string
-
toByteArray
Returns a string which can be written to a Java source file as part of a static initializer for a byte array. Returns data in the format 0xAB, 0xCD, .... use like: javafile.print("byte[] data = {") javafile.print(Hexdump.toByteArray(data)); javafile.println("};");- Parameters:
_buf- buffer_ofs- offset_len- length- Returns:
- string
-