length1 = offset - temp_offset - 2 * increment;
length1 = offset - temp_offset - (increment<<1);
	private int process_pi_val() throws ParseException, EncodingException, EOFException{		int length1;		int parser_state;		while (true) {			if (XMLChar.isValidChar(ch)) {				//System.out.println(""+(char)ch);				if (ch == '?')					if (skipChar('>')) {						break;					} else						throw new ParseException(								"Error in PI: invalid termination sequence for PI"										+ formatLineNumber());			} else				throw new ParseException(						"Errors in PI: Invalid char in PI val"								+ formatLineNumber());			ch = getChar();		}		length1 = offset - temp_offset - 2 * increment;		/*		 * System.out.println( ((char) XMLDoc[temp_offset]) + " " +		 * (temp_offset) + " " + length1 + " PI val " + depth);		 */		if (encoding < FORMAT_UTF_16BE) {			if (length1 > MAX_TOKEN_LENGTH)				throw new ParseException("Token Length Error:"						+ "PI VAL too long (>0xfffff)"						+ formatLineNumber());			writeVTD(temp_offset, length1, TOKEN_PI_VAL, depth);		} else {			if (length1 > (MAX_TOKEN_LENGTH << 1))				throw new ParseException("Token Length Error:"						+ "PI VAL too long (>0xfffff)"						+ formatLineNumber());			writeVTD(temp_offset >> 1, length1 >> 1, TOKEN_PI_VAL,					depth);		}		//length1 = 0;		temp_offset = offset;		ch = getCharAfterSe();		if (ch == '<') {			parser_state = STATE_LT_SEEN;		} else if (XMLChar.isContentChar(ch)) {			//temp_offset = offset;			parser_state = STATE_TEXT;		} else if (ch == '&') {			//has_amp = true;			//temp_offset = offset;			entityIdentifier();			parser_state = STATE_TEXT;		} else if (ch == ']') {			if (skipChar(']')) {				while (skipChar(']')) {				}				if (skipChar('>'))					throw new ParseException(							"Error in text content: ]]> in text content"									+ formatLineNumber());			}			parser_state = STATE_TEXT;		} else			throw new ParseException(					"Error in text content: Invalid char"							+ formatLineNumber());		return parser_state;	}