public final class Base16 extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(String s)
Decodes base-16 encoded string.
|
static byte[] |
decode(String s,
int limit)
Same as
decode(String), except that argument limt allows to
limit the number of decoded bytes. |
static String |
encode(byte[] b)
Encodes binary data to base-16.
|
public static byte[] decode(String s)
s - base-16 string to be decodednull if string cannot be
decoded.public static byte[] decode(String s, int limit)
decode(String), except that argument limt allows to
limit the number of decoded bytes. This is useful, for example, to
detect the format of a base-16 encoded image based on its magic string.public static String encode(byte[] b)
b - binary data to be encoded