|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.util.Hex
public final class Hex
Utilities for formatting numbers as hexadecimal.
| Method Summary | |
|---|---|
static String |
dump(byte[] arr,
int offset,
int length,
int outOffset,
int bpl,
int addressLength)
Formats a hex dump of a portion of a byte[]. |
static String |
s1(int v)
Formats an int as a 1-byte signed hex value. |
static String |
s2(int v)
Formats an int as a 2-byte signed hex value. |
static String |
s4(int v)
Formats an int as a 4-byte signed hex value. |
static String |
s8(long v)
Formats a long as an 8-byte signed hex value. |
static String |
u1(int v)
Formats an int as a 1-byte unsigned hex value. |
static String |
u2(int v)
Formats an int as a 2-byte unsigned hex value. |
static String |
u2or4(int v)
Formats an int as either a 2-byte unsigned hex value
(if the value is small enough) or a 4-byte unsigned hex value (if
not). |
static String |
u3(int v)
Formats an int as a 3-byte unsigned hex value. |
static String |
u4(int v)
Formats an int as a 4-byte unsigned hex value. |
static String |
u8(long v)
Formats a long as an 8-byte unsigned hex value. |
static String |
uNibble(int v)
Formats an int as a 4-bit unsigned hex nibble. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String u8(long v)
long as an 8-byte unsigned hex value.
v - value to format
non-null; formatted formpublic static String u4(int v)
int as a 4-byte unsigned hex value.
v - value to format
non-null; formatted formpublic static String u3(int v)
int as a 3-byte unsigned hex value.
v - value to format
non-null; formatted formpublic static String u2(int v)
int as a 2-byte unsigned hex value.
v - value to format
non-null; formatted formpublic static String u2or4(int v)
int as either a 2-byte unsigned hex value
(if the value is small enough) or a 4-byte unsigned hex value (if
not).
v - value to format
non-null; formatted formpublic static String u1(int v)
int as a 1-byte unsigned hex value.
v - value to format
non-null; formatted formpublic static String uNibble(int v)
int as a 4-bit unsigned hex nibble.
v - value to format
non-null; formatted formpublic static String s8(long v)
long as an 8-byte signed hex value.
v - value to format
non-null; formatted formpublic static String s4(int v)
int as a 4-byte signed hex value.
v - value to format
non-null; formatted formpublic static String s2(int v)
int as a 2-byte signed hex value.
v - value to format
non-null; formatted formpublic static String s1(int v)
int as a 1-byte signed hex value.
v - value to format
non-null; formatted form
public static String dump(byte[] arr,
int offset,
int length,
int outOffset,
int bpl,
int addressLength)
byte[]. The result
is always newline-terminated, unless the passed-in length was zero,
in which case the result is always the empty string ("").
arr - non-null; array to formatoffset - >= 0; offset to the part to dumplength - >= 0; number of bytes to dumpoutOffset - >= 0; first output offset to printbpl - >= 0; number of bytes of output per lineaddressLength - {2,4,6,8}; number of characters for each address
header
non-null; a string of the dump
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||