currentOffset = getTokenOffset(index);   return matchTokenString(currentOffset, len, s);
currentOffset = offset; int endOffset = offset + len; int l; if (encoding < FORMAT_UTF8) { int i = 0; l = s.length(); for (i = 0; i < l && currentOffset < endOffset; i++) { if ((XMLDoc.byteAt(currentOffset) & 0xff) != '&') { if (s.charAt(i) != (XMLDoc.byteAt(currentOffset) & 0xff)) return false; currentOffset++; } else { if (s.charAt(i) != getCharResolved()) { return false; } } } if (i == l && currentOffset == endOffset) return true; else return false; } else { int i = 0; l = s.length(); for (i = 0; i < l && currentOffset < endOffset; i++) { if (s.charAt(i) != getCharResolved()) { return false; } } if (i == l && currentOffset == endOffset) return true; else return false; }
	public boolean matchTokenString(int index, String s) throws NavException {		if (s == null)			throw new IllegalArgumentException("string can't be null");		int type = getTokenType(index);		int len =			(type == TOKEN_STARTING_TAG				|| type == TOKEN_ATTR_NAME				|| type == TOKEN_ATTR_NS)				? getTokenLength(index) & 0xffff				: getTokenLength(index);		// upper 16 bit is zero or for prefix		currentOffset = getTokenOffset(index);		// point currentOffset to the beginning of the token		// for UTF 8 and ISO, the performance is a little better by avoid calling getChar() everytime		return matchTokenString(currentOffset, len, s);	}