Package com.sun.corba.ee.impl.encoding
Class CodeSetCache
- java.lang.Object
-
- com.sun.corba.ee.impl.encoding.CodeSetCache
-
class CodeSetCache extends java.lang.ObjectThread local cache of sun.io code set converters for performance. The thread local class contains a single reference to a Map[] containing two WeakHashMaps. One for CharsetEncoders and one for CharsetDecoders. Constants are defined for indexing. This is used internally by CodeSetConversion.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ThreadLocal<java.util.WeakHashMap<java.lang.String,java.nio.charset.CharsetDecoder>>btcMapLocalprivate java.lang.ThreadLocal<java.util.WeakHashMap<java.lang.String,java.nio.charset.CharsetEncoder>>ctbMapLocal
-
Constructor Summary
Constructors Constructor Description CodeSetCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.nio.charset.CharsetDecodergetByteToCharConverter(java.lang.String key)Retrieve a CharsetDecoder from the Map using the given key.(package private) java.nio.charset.CharsetEncodergetCharToByteConverter(java.lang.String key)Retrieve a CharsetEncoder from the Map using the given key.(package private) java.nio.charset.CharsetDecodersetConverter(java.lang.String key, java.nio.charset.CharsetDecoder converter)Stores the given CharsetDecoder in the thread local cache, and returns the same converter.(package private) java.nio.charset.CharsetEncodersetConverter(java.lang.String key, java.nio.charset.CharsetEncoder converter)Stores the given CharsetEncoder in the thread local cache, and returns the same converter.
-
-
-
Method Detail
-
getByteToCharConverter
java.nio.charset.CharsetDecoder getByteToCharConverter(java.lang.String key)
Retrieve a CharsetDecoder from the Map using the given key.
-
getCharToByteConverter
java.nio.charset.CharsetEncoder getCharToByteConverter(java.lang.String key)
Retrieve a CharsetEncoder from the Map using the given key.
-
setConverter
java.nio.charset.CharsetDecoder setConverter(java.lang.String key, java.nio.charset.CharsetDecoder converter)Stores the given CharsetDecoder in the thread local cache, and returns the same converter.
-
setConverter
java.nio.charset.CharsetEncoder setConverter(java.lang.String key, java.nio.charset.CharsetEncoder converter)Stores the given CharsetEncoder in the thread local cache, and returns the same converter.
-
-