if (XMLDoc[offset - 1] < 0xDC00 || XMLDoc[offset - 1] > 0xDFFFF) {
temp =(XMLDoc[offset]&0xff) << 8 | (XMLDoc[offset + 1]&0xff); if (temp < 0xd800 || temp > 0xdfff) {
	private int getPrevOffset() throws ParseException {		int prevOffset = offset;		switch (encoding) {			case FORMAT_UTF8 :				do {					prevOffset--;				} while (XMLDoc[prevOffset] <0);				return prevOffset;			case FORMAT_ASCII :			case FORMAT_ISO_8859 :				return offset - 1;			case FORMAT_UTF_16LE :				if (XMLDoc[offset - 2] < 0xDC00					|| XMLDoc[offset - 2] > 0xDFFFF) {					return offset - 2;				} else					return offset - 4;			case FORMAT_UTF_16BE :				if (XMLDoc[offset - 1] < 0xDC00					|| XMLDoc[offset - 1] > 0xDFFFF) {					return offset - 2;				} else					return offset - 4;			default :				throw new ParseException("Other Error: Should never happen");		}	}