php.java.bridge
Class StringCache

java.lang.Object
  extended by php.java.bridge.StringCache

public final class StringCache
extends java.lang.Object

Cache [Entry(byte[], enc) -> String]. No synchronization, so use this class per thread or per request only.


Constructor Summary
StringCache(JavaBridge bridge)
          Create a new StringCache
 
Method Summary
 void clear()
          Removes all mappings from this cache.
 java.lang.String getString(byte[] name, int start, int length, java.lang.String encoding)
          Get a string from the string cache.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringCache

public StringCache(JavaBridge bridge)
Create a new StringCache

Parameters:
bridge - The JavaBridge
Method Detail

getString

public java.lang.String getString(byte[] name,
                                  int start,
                                  int length,
                                  java.lang.String encoding)
Get a string from the string cache.

Parameters:
name - The representation of the string
start - The start position within the byte array
length - The length of the array
encoding - The file.encoding.
Returns:
the cached string.

clear

public void clear()
Removes all mappings from this cache.