void copyUcs2ReadBuffer(int count, int shift1, int shift2)
            throws java.lang.Exception
    {
        int j = readBufferPos;

        if (count > 0 && (count % 2) != 0) {
            encodingError("odd number of bytes in UCS-2 encoding", -1, count);
        }
        for (int i = 0; i < count; i += 2) {
            readBuffer[j++] = (char) (((rawReadBuffer[i] & 0xff) << shift1) | ((rawReadBuffer[i + 1] & 0xff) << shift2));
            if (readBuffer[j - 1] == '\r') {
                sawCR = true;
            }
        }
        readBufferLength = j;
    }