tengo esta función y asi como tu dices no funciona, me manda esta excepción
  Cita:  Exception in thread "main" java.lang.NumberFormatException: For input string: "f"
     Cita:      public byte [] ochoBits (int b) {
        byte [] ocho = null;
        String c = Integer.toHexString(b);
        System.out.println(c.length());
        if (c.length() == 4) {
            ocho [0] = Byte.parseByte(c.substring(0, 1));
            ocho [1] = Byte.parseByte(c.substring(2, 3));
        } else if (c.length() == 3) {
            System.out.print(c+"tres");
        } else if (c.length() == 2) {
            System.out.print(c+"dos");
        } else if (c.length() == 1) {
            System.out.print(c+"uno");
        }        
        return ocho;
    }