You can convert from char to hex string.
char ch =
String hex = String.format("%04x", (int) ch);
To read hex and convert to binary you can do
int num = Integer.parseInt(text, 16);
String bin = Integer.toString(num, 2);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…