Package com.sun.corba.ee.impl.encoding
Class CodeSetCache
java.lang.Object
com.sun.corba.ee.impl.encoding.CodeSetCache
Thread 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
FieldsModifier and TypeFieldDescriptionprivate ThreadLocal
<WeakHashMap<String, CharsetDecoder>> private ThreadLocal
<WeakHashMap<String, CharsetEncoder>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) CharsetDecoder
Retrieve a CharsetDecoder from the Map using the given key.(package private) CharsetEncoder
Retrieve a CharsetEncoder from the Map using the given key.(package private) CharsetDecoder
setConverter
(String key, CharsetDecoder converter) Stores the given CharsetDecoder in the thread local cache, and returns the same converter.(package private) CharsetEncoder
setConverter
(String key, CharsetEncoder converter) Stores the given CharsetEncoder in the thread local cache, and returns the same converter.
-
Field Details
-
ctbMapLocal
-
btcMapLocal
-
-
Constructor Details
-
CodeSetCache
CodeSetCache()
-
-
Method Details
-
getByteToCharConverter
Retrieve a CharsetDecoder from the Map using the given key. -
getCharToByteConverter
Retrieve a CharsetEncoder from the Map using the given key. -
setConverter
Stores the given CharsetDecoder in the thread local cache, and returns the same converter. -
setConverter
Stores the given CharsetEncoder in the thread local cache, and returns the same converter.
-