{ int j = readBufferPos;  if (count > 0 && (count % 2) != 0) { encodingError ("odd number of bytes in UCS-2 encoding", -1, count); }  if (shift1 == 0) { for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer [i + 1] << 8); c |= 0xff & rawReadBuffer [i]; readBuffer [j++] = c; if (c == '\r') sawCR = true; } } else { for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer [i] << 8); c |= 0xff & rawReadBuffer [i + 1]; readBuffer [j++] = c; if (c == '\r') sawCR = true; } } readBufferLength = j; }
{ int j = readBufferPos;  if (count > 0 && (count % 2) != 0) { encodingError("odd number of bytes in UCS-2 encoding", -1, count); }  if (shift1 == 0) { for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer[i + 1] << 8); c |= 0xff & rawReadBuffer[i]; readBuffer[j++] = c; if (c == '\r') { sawCR = true; } } } else { for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer[i] << 8); c |= 0xff & rawReadBuffer[i + 1]; readBuffer[j++] = c; if (c == '\r') { sawCR = true; } } } readBufferLength = j; }
    private void copyUcs2ReadBuffer (int count, int shift1, int shift2)    throws SAXException    {	int j = readBufferPos;	if (count > 0 && (count % 2) != 0) {	    encodingError ("odd number of bytes in UCS-2 encoding", -1, count);	}	// The loops are faster with less internal brancing; hence two	if (shift1 == 0) {	// "UTF-16-LE"	    for (int i = 0; i < count; i += 2) {		char c = (char) (rawReadBuffer [i + 1] << 8);		c |= 0xff & rawReadBuffer [i];		readBuffer [j++] = c;		if (c == '\r')		    sawCR = true;	    }	} else {	// "UTF-16-BE"	    for (int i = 0; i < count; i += 2) {		char c = (char) (rawReadBuffer [i] << 8);		c |= 0xff & rawReadBuffer [i + 1];		readBuffer [j++] = c;		if (c == '\r')		    sawCR = true;	    }	}	readBufferLength = j;    }