java.lang.Object
org.freedesktop.dbus.utils.Hexdump
-
Field Summary
Fields -
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, int ofs, int len)
-
Field Details
-
HEX_CHARS
public static final char[] HEX_CHARS
-
-
Method Details
-
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- bufferofs- offsetlen- length- Returns:
- string
-