protected int readShortArray(short[] s) throws IOException {

        if (s.length == 0) {
            return 0;
        }

        byte[] b = new byte[2*s.length];

        if (read(b, 0, b.length) < b.length) {
            primitiveEOFThrower();
        }
        char c = (char) (b[0] << 8 | b[1]);

        for(int i=0; i<s.length; i += 1) {
            s[i] = (short) (b[2*i] << 8 | (b[2*i+1]&0xFF));
        }
        return b.length;
    }