## org.apache.xerces.utils
Class SymbolCache

    java.lang.Object
      |
      +--org.apache.xerces.utils.SymbolCache

public final class SymbolCache
extends java.lang.Object

Version:

Field Summary
`static int` `CACHE_RECORD_SIZE`
`static int` `CHAR_OFFSET`
`int` `fCacheLineCount`
`int[][]` `fCacheLines`
`char[]` `fSymbolChars`
`int` `fSymbolCharsOffset`
`static int` `HEAD_INITIAL_CACHE_RECORD_COUNT`
`static int` `INDEX_OFFSET`
`static int` `INITIAL_CACHE_RECORD_COUNT`
`static int` `NEXT_OFFSET`

Constructor Summary

`SymbolCache()`
public void dumpCache() { System.out.println("fSymbolChars.length == "+fSymbolChars.length); for (int i = 0; i < fSymbolCharsOffset; i++) System.out.println("fSymbolChars["+i+"] == "+fSymbolChars[i]); for (int i = 0; i < fCacheLineCount; i++) { System.out.print("fCacheLines["+i+"] (num records == "+ fCacheLines[i][0]+") == {"); int offset = 1; for (int j = 0; j < fCacheLines[i][0]; j++) { System.out.print("{char="+ (new Character((char)fCacheLines[i][offset+CHAR_OFFSET]).

Method Summary
`int` `addSymbolToCache(java.lang.String str, int slen, int symbolHandle)`
`java.lang.String` `createSymbol(int symbolHandle, int startOffset, int entry, int[] entries, int offset)`
`char[]` `getSymbolChars()`
`void` `reset()`
`void` `updateCacheLine(int charsOffset, int totalMisses, int length)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CHAR_OFFSET

    public static final int CHAR_OFFSET

### INDEX_OFFSET

    public static final int INDEX_OFFSET

### NEXT_OFFSET

    public static final int NEXT_OFFSET

### CACHE_RECORD_SIZE

    public static final int CACHE_RECORD_SIZE

### INITIAL_CACHE_RECORD_COUNT

    public static final int INITIAL_CACHE_RECORD_COUNT

### HEAD_INITIAL_CACHE_RECORD_COUNT

    public static final int HEAD_INITIAL_CACHE_RECORD_COUNT

### fSymbolChars

    public char[] fSymbolChars

### fSymbolCharsOffset

    public int fSymbolCharsOffset

### fCacheLines

    public int[][] fCacheLines

### fCacheLineCount

    public int fCacheLineCount

Constructor Detail

### SymbolCache

    public SymbolCache()

  public void dumpCache() { System.out.println("fSymbolChars.length == "+fSymbolChars.length); for (int i = 0; i < fSymbolCharsOffset; i++) System.out.println("fSymbolChars["+i+"] == "+fSymbolChars[i]); for (int i = 0; i < fCacheLineCount; i++) { System.out.print("fCacheLines["+i+"] (num records == "+ fCacheLines[i][0]+") == {"); int offset = 1; for (int j = 0; j < fCacheLines[i][0]; j++) { System.out.print("{char="+ (new Character((char)fCacheLines[i][offset+CHAR_OFFSET]). toString())+ "; idx="+fCacheLines[i][offset+INDEX_OFFSET]+ "; next="+fCacheLines[i][offset+NEXT_OFFSET]+"}"); offset += CACHE_RECORD_SIZE; } System.out.println("} - (Actual size == "+fCacheLines[i].length+")"); } }

Method Detail

### reset

    public void reset()

### getSymbolChars

    public char[] getSymbolChars()

### createSymbol

    public java.lang.String createSymbol(int symbolHandle,
                                         int startOffset,
                                         int entry,
                                         int[] entries,
                                         int offset)

### addSymbolToCache

    public int addSymbolToCache(java.lang.String str,
                                int slen,
                                int symbolHandle)

### updateCacheLine

    public void updateCacheLine(int charsOffset,
                                int totalMisses,
                                int length)

Copyright © 1999-2001 Apache XML Project. All Rights Reserved.