Package com.sun.corba.ee.impl.encoding
Class CodeSetConversion.JavaCTBConverter
java.lang.Object
com.sun.corba.ee.impl.encoding.CodeSetConversion.CTBConverter
com.sun.corba.ee.impl.encoding.CodeSetConversion.JavaCTBConverter
- Direct Known Subclasses:
CodeSetConversion.UTF16CTBConverter
- Enclosing class:
CodeSetConversion
Implementation of CTBConverter which uses a nio.Charset.CharsetEncoder
to do the real work. Handles translation of exceptions to the
appropriate CORBA versions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private ByteBuffer
(package private) WeakHashMap
<String, ByteBuffer> private char[]
private CharsetEncoder
private int
private int
-
Constructor Summary
ConstructorsConstructorDescriptionJavaCTBConverter
(OSFCodeSetRegistry.Entry codeset, int alignmentForEncoding) -
Method Summary
Modifier and TypeMethodDescriptionvoid
convert
(char chToConvert) void
private void
final int
byte[]
getBytes()
final float
final int
final void
setAlignment
(int newAlignment)
-
Field Details
-
ctb
-
alignment
private int alignment -
chars
private char[] chars -
numBytes
private int numBytes -
numChars
private int numChars -
buffer
-
cacheEncoder
WeakHashMap<String,ByteBuffer> cacheEncoder
-
-
Constructor Details
-
JavaCTBConverter
-
-
Method Details
-
getMaxBytesPerChar
public final float getMaxBytesPerChar()- Specified by:
getMaxBytesPerChar
in classCodeSetConversion.CTBConverter
-
convert
public void convert(char chToConvert) - Specified by:
convert
in classCodeSetConversion.CTBConverter
-
convert
- Specified by:
convert
in classCodeSetConversion.CTBConverter
-
getNumBytes
public final int getNumBytes()- Specified by:
getNumBytes
in classCodeSetConversion.CTBConverter
-
getAlignment
public final int getAlignment()- Specified by:
getAlignment
in classCodeSetConversion.CTBConverter
-
setAlignment
public final void setAlignment(int newAlignment) -
getBytes
public byte[] getBytes()- Specified by:
getBytes
in classCodeSetConversion.CTBConverter
-
convertCharArray
private void convertCharArray()
-