private char getChar(int i) {
        if(i >= 0 && i < 10) {
            return (char) ('0' + i);
        }
        switch (i) {
            case 10: return 'A';
            case 11: return 'B';
            case 12: return 'C';
            case 13: return 'D';
            case 14: return 'E';
            case 15: return 'F';
        }
        throw new IllegalArgumentException();
    }