Top Fields Constructors Methods
org.freedesktop.dbus.utils

public final Class Hexdump

extends Object
Class Inheritance
Imports
java.io.PrintStream

Field Summary

Modifier and TypeField and Description
private static final char[]

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String
format(byte[] _buf)

public static String
format(byte[] _buf, int _width)

public static String
toAscii(byte[] _buf)

public static String
toAscii(byte[] _buf, int _ofs, int _len)

public static String

Returns:

string
toByteArray
(byte[]
buffer
_buf
)

Returns a string which can be written to a Java source file as part of a static initializer for a byte array.

public static String

Returns:

string
toByteArray
(byte[]
buffer
_buf
,
int
offset
_ofs
,
int
length
_len
)

Returns a string which can be written to a Java source file as part of a static initializer for a byte array.

public static String
toHex(byte[] _buf)

public static String
toHex(byte[] _buf, boolean _spaces)

public static String
toHex(byte[] _buf, int _ofs, int _len, boolean _spaces)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HEX_CHARSback to summary
private static final char[] HEX_CHARS

Constructor Detail

Hexdumpback to summary
private Hexdump()

Method Detail

formatback to summary
public static String format(byte[] _buf)
formatback to summary
public static String format(byte[] _buf, int _width)
toAsciiback to summary
public static String toAscii(byte[] _buf)
toAsciiback to summary
public static String toAscii(byte[] _buf, int _ofs, int _len)
toByteArrayback to summary
public static String toByteArray(byte[] _buf)

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:byte[]

buffer

Returns:String

string

toByteArrayback to summary
public static String toByteArray(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. Returns data in the format 0xAB, 0xCD, .... use like: javafile.print("byte[] data = {") javafile.print(Hexdump.toByteArray(data)); javafile.println("};");

Parameters
_buf:byte[]

buffer

_ofs:int

offset

_len:int

length

Returns:String

string

toHexback to summary
public static String toHex(byte[] _buf)
toHexback to summary
public static String toHex(byte[] _buf, boolean _spaces)
toHexback to summary
public static String toHex(byte[] _buf, int _ofs, int _len, boolean _spaces)