@Override public int readUnsignedByte() throws IOException { return ((int) readByte()) & 0xff; }
@Override public byte readByte() throws IOException { readFully(work, 0, 1); return work[0]; }
@Override public int readUnsignedShort() throws IOException { return ((int) readShort()) & 0xffff; }
@Override public double readDouble() throws IOException { return Double.longBitsToDouble(readLong()); }
@Override public float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
@Override public int readInt() throws IOException { readFully(work, 0, 4); return (((int) work[0]) & 0xff) | (((int) work[1]) & 0xff) << 8 | (((int) work[2]) & 0xff) << 16 | (((int) work[3]) & 0xff) << 24; }
@Override public short readShort() throws IOException { readFully(work, 0, 2); return (short) ( (((int) work[0]) & 0xff) | (((int) work[1]) & 0xff) << 8); }
@Override public long readLong() throws IOException { readFully(work, 0, 8); return (((long) work[0]) & 0xffL) | (((long) work[1]) & 0xffL) << 8 | (((long) work[2]) & 0xffL) << 16 | (((long) work[3]) & 0xffL) << 24 | (((long) work[4]) & 0xffL) << 32 | (((long) work[5]) & 0xffL) << 40 | (((long) work[6]) & 0xffL) << 48 | (((long) work[7]) & 0xffL) << 56; }
@Override public boolean readBoolean() throws IOException { readFully(work, 0, 1); return work[0] != 0; }
@Override public char readChar() throws IOException { readFully(work, 0, 2); return (char) ((work[1] << 8) | (work[0] & 0xff)); }