Byte b = (Byte) CODES.get(new Character(Character.toUpperCase(s.charAt(i))));
Byte b = (Byte) CODES.get(new Character(s.charAt(i)));
    public void write(ByteBuffer buffer) throws IOException {      buffer.put((byte) 0x7F);      if (_column.getType() == DataType.TEXT) {        String s = (String) _value;        for (int i = 0; i < s.length(); i++) {          Byte b = (Byte) CODES.get(new Character(Character.toUpperCase(s.charAt(i))));                    if (b == null) {            throw new IOException("Unmapped index value: " + s.charAt(i));          } else {            byte bv = b.byteValue();            //WTF is this?  No idea why it's this way, but it is. :)            if (bv == (byte) 2 || bv == (byte) 3 || bv == (byte) 9 || bv == (byte) 11 ||                bv == (byte) 13 || bv == (byte) 15)            {              buffer.put((byte) 43);  //Ah, the magic 43.            }            buffer.put(b.byteValue());            if (s.equals("_")) {              buffer.put((byte) 3);            }          }        }        buffer.put((byte) 1);        buffer.put((byte) 0);      } else {        Comparable value = _value;        if (value instanceof Integer) {          value = new Integer((int) (((Integer) value).longValue() - ((long) Integer.MAX_VALUE + 1L)));        } else if (value instanceof Short) {          value = new Short((short) (((Short) value).longValue() - ((long) Integer.MAX_VALUE + 1L)));        }        buffer.put(_column.write(value, ByteOrder.BIG_ENDIAN));      }    }