System.out.print(Integer.toHexString(b[i] & 0x0FF));
を
System.out.printf("%02X", b[i]);
でだめ?