|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.rtner.misc.BinTools
public class BinTools
Free auxiliary functions
| Field Summary | |
|---|---|
static java.lang.String |
hex
|
| Constructor Summary | |
|---|---|
BinTools()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
bin2hex(byte[] b)
Simple binary-to-hexadecimal conversion. |
static int |
hex2bin(char c)
Convert hex digit to numerical value. |
static byte[] |
hex2bin(java.lang.String s)
Convert hex string to array of bytes. |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String hex
| Constructor Detail |
|---|
public BinTools()
| Method Detail |
|---|
public static java.lang.String bin2hex(byte[] b)
b - Input bytes. May be null.
null input.public static byte[] hex2bin(java.lang.String s)
s - String containing hexadecimal digits. May be null.
On odd length leading zero will be assumed.
null.
java.lang.IllegalArgumentException - when string contains non-hex characterpublic static int hex2bin(char c)
c - 0-9, a-f, A-F allowd.
java.lang.IllegalArgumentException - on non-hex characterpublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||