From: Wolfgang M. M. <wol...@us...> - 2004-08-15 20:29:19
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/analysis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18976/src/org/exist/storage/analysis Modified Files: TextToken.java Log Message: Fixed class LRUCache. LRUCache is now used for the data pages in DOMFile + BFile. LRU seems to be a better strategy for the data pages than LRD. It produces less page failures. Index: TextToken.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/analysis/TextToken.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TextToken.java 14 Apr 2004 12:17:23 -0000 1.3 --- TextToken.java 15 Aug 2004 20:29:10 -0000 1.4 *************** *** 104,107 **** --- 104,114 ---- } + public CharSequence getCharSequence() { + if(start >= tokenText.length() || end > tokenText.length()) + throw new StringIndexOutOfBoundsException("start: " + start + + "; end=" + end + "; text=" + tokenText); + return tokenText.subSequence( start, end ); + } + public String getText() { if(start >= tokenText.length() || end > tokenText.length()) |