getConstName

Returns the name of a constant which is defined in given Class,
has a name beginning with given prefix, and has given value. If the
constant's name cannot be found, the value is returned as a hex String.

Parameters:

cls - the Class containing the constant

constPrefix - the prefix of the constant name (used in grouping constants)

createString

Creates a String from a C-style null terminated byte sequence.
The null terminated byte sequence is interpreted as 8-bit ISO-8859-1
characters (a.k.a. ISO-Latin-1), which is a superset of US-ASCII.
This way we don't lose any 8-bit values and remain fully compatible:
If the source charset is unknown, a str.getByte("ISO8859_1") will
reconstruct the exact original byte sequence which the application
can then process in any charset it sees fit.

Parameters:

bytes - a byte array containing a C-style null terminated string

offset - the offset within bytes where the string begins

length - the length of the C-style string in bytes, which may
include any number of terminating null ('\0') characters

toHexString

Creates a String containing the hexadecimal representation of the given
bytes.

If max is non-negative and bytes.length > max, then the
first max bytes are returned, followed by a human-readable
indication that there are bytes.length total bytes of data
including those that are not returned.

toHexString

Creates a String containing the hexadecimal representation of the given
bytes.

If max is non-negative and len > max, then the
first max bytes are returned, followed by a human-readable
indication that there are len total bytes of data
including those that are not returned.

In particular, offset + len can extend beyond the array boundaries,
as long as offset + max is still within them, resulting in
max bytes returned followed by an indication that there are
len total data bytes (including those that are not returned).