All Packages Class Hierarchy This Package Previous Next Index
Class com.jclark.xml.tok.StringConversionCache
java.lang.Object
|
+----com.jclark.xml.tok.StringConversionCache
- public class StringConversionCache
- extends Object
Caches conversion of byte subarrays into Strings.
-
StringConversionCache(Encoding)
- Create a cache of the default size for converting byte subarrays
in the specified encoding into Strings.
-
StringConversionCache(Encoding, int)
- Create a cache of the specified size
for converting byte subarrays in the specified encoding
into Strings.
-
convert(byte[], int, int, boolean)
- Convert a byte subarray into a String.
-
setEncoding(Encoding)
- Changes the encoding for the cache.
StringConversionCache
public StringConversionCache(Encoding enc,
int cacheSize)
- Create a cache of the specified size
for converting byte subarrays in the specified encoding
into Strings.
StringConversionCache
public StringConversionCache(Encoding enc)
- Create a cache of the default size for converting byte subarrays
in the specified encoding into Strings.
setEncoding
public void setEncoding(Encoding enc)
- Changes the encoding for the cache.
This cannot be called after any calls to
convert
have been made.
convert
public String convert(byte buf[],
int start,
int end,
boolean permanent)
- Convert a byte subarray into a String.
If
permanent
is true, then this conversion will
be kept in the cache in preference to any non-permanent conversions.
All Packages Class Hierarchy This Package Previous Next Index