org.xbill.DNS.utils
Class base16
java.lang.Object
|
+--org.xbill.DNS.utils.base16
- public class base16
- extends Object
Routines for converting between Strings of hex-encoded data and arrays of
binary data. This is not actually used by DNS.
|
Method Summary |
static byte[] |
fromString(String str)
Convert a hex-encoded String to binary data |
static String |
toString(byte[] b)
Convert binary data to a hex-encoded String |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
toString
public static String toString(byte[] b)
- Convert binary data to a hex-encoded String
- Parameters:
b - An array containing binary data- Returns:
- A String containing the encoded data
fromString
public static byte[] fromString(String str)
- Convert a hex-encoded String to binary data
- Parameters:
b - A String containing the encoded data- Returns:
- An array containing the binary data, or null if the string is invalid