Skip navigation links

Oracle® Database JDBC Java API Reference
12c Release 1 (12.1)

E17663-06


oracle.sql
Class CharacterSetWithConverter

java.lang.Object
  extended by oracle.sql.CharacterSet
      extended by oracle.sql.CharacterSetWithConverter


public abstract class CharacterSetWithConverter
extends CharacterSet

This is an abstract base class that all character sets that use CharacterConverter are based on.


Field Summary
static String BUILD_DATE
           
static oracle.sql.converter.CharacterConverterFactory ccFactory
           
static boolean TRACE
           

 

Fields inherited from class oracle.sql.CharacterSet
AL16UTF16_CHARSET, AL16UTF16LE_CHARSET, AL24UTFFSS_CHARSET, AL32UTF8_CHARSET, AR8ADOS710_CHARSET, AR8ADOS710T_CHARSET, AR8ADOS720_CHARSET, AR8ADOS720T_CHARSET, AR8APTEC715_CHARSET, AR8APTEC715T_CHARSET, AR8ARABICMAC_CHARSET, AR8ARABICMACS_CHARSET, AR8ARABICMACT_CHARSET, AR8ASMO708PLUS_CHARSET, AR8ASMO8X_CHARSET, AR8EBCDIC420S_CHARSET, AR8EBCDICX_CHARSET, AR8HPARABIC8T_CHARSET, AR8ISO8859P6_CHARSET, AR8MSAWIN_CHARSET, AR8MSWIN1256_CHARSET, AR8MUSSAD768_CHARSET, AR8MUSSAD768T_CHARSET, AR8NAFITHA711_CHARSET, AR8NAFITHA711T_CHARSET, AR8NAFITHA721_CHARSET, AR8NAFITHA721T_CHARSET, AR8SAKHR706_CHARSET, AR8SAKHR707_CHARSET, AR8SAKHR707T_CHARSET, AR8XBASIC_CHARSET, ASCII_CHARSET, AZ8ISO8859P9E_CHARSET, BG8MSWIN_CHARSET, BG8PC437S_CHARSET, BLT8CP921_CHARSET, BLT8EBCDIC1112_CHARSET, BLT8EBCDIC1112S_CHARSET, BLT8ISO8859P13_CHARSET, BLT8MSWIN1257_CHARSET, BLT8PC775_CHARSET, BN8BSCII_CHARSET, CDN8PC863_CHARSET, CE8BS2000_CHARSET, CEL8ISO8859P14_CHARSET, CH7DEC_CHARSET, CL8BS2000_CHARSET, CL8EBCDIC1025_CHARSET, CL8EBCDIC1025C_CHARSET, CL8EBCDIC1025R_CHARSET, CL8EBCDIC1025S_CHARSET, CL8EBCDIC1025X_CHARSET, CL8EBCDIC1158_CHARSET, CL8EBCDIC1158R_CHARSET, CL8ISO8859P5_CHARSET, CL8ISOIR111_CHARSET, CL8KOI8R_CHARSET, CL8KOI8U_CHARSET, CL8MACCYRILLIC_CHARSET, CL8MACCYRILLICS_CHARSET, CL8MSWIN1251_CHARSET, D7DEC_CHARSET, D7SIEMENS9780X_CHARSET, D8BS2000_CHARSET, D8EBCDIC1141_CHARSET, D8EBCDIC273_CHARSET, DEFAULT_CHARSET, DK7SIEMENS9780X_CHARSET, DK8BS2000_CHARSET, DK8EBCDIC1142_CHARSET, DK8EBCDIC277_CHARSET, E7DEC_CHARSET, E7SIEMENS9780X_CHARSET, E8BS2000_CHARSET, EE8BS2000_CHARSET, EE8EBCDIC870_CHARSET, EE8EBCDIC870C_CHARSET, EE8EBCDIC870S_CHARSET, EE8ISO8859P2_CHARSET, EE8MACCE_CHARSET, EE8MACCES_CHARSET, EE8MACCROATIAN_CHARSET, EE8MACCROATIANS_CHARSET, EE8MSWIN1250_CHARSET, EE8PC852_CHARSET, EEC8EUROASCI_CHARSET, EEC8EUROPA3_CHARSET, EL8DEC_CHARSET, EL8EBCDIC423R_CHARSET, EL8EBCDIC875_CHARSET, EL8EBCDIC875R_CHARSET, EL8EBCDIC875S_CHARSET, EL8GCOS7_CHARSET, EL8ISO8859P7_CHARSET, EL8MACGREEK_CHARSET, EL8MACGREEKS_CHARSET, EL8MSWIN1253_CHARSET, EL8PC437S_CHARSET, EL8PC737_CHARSET, EL8PC851_CHARSET, EL8PC869_CHARSET, ET8MSWIN923_CHARSET, F7DEC_CHARSET, F7SIEMENS9780X_CHARSET, F8BS2000_CHARSET, F8EBCDIC1147_CHARSET, F8EBCDIC297_CHARSET, HU8ABMOD_CHARSET, HU8CWI2_CHARSET, I7DEC_CHARSET, I7SIEMENS9780X_CHARSET, I8EBCDIC1144_CHARSET, I8EBCDIC280_CHARSET, IN8ISCII_CHARSET, IS8MACICELANDIC_CHARSET, IS8MACICELANDICS_CHARSET, IS8PC861_CHARSET, ISO_LATIN_1_CHARSET, IW7IS960_CHARSET, IW8EBCDIC1086_CHARSET, IW8EBCDIC424_CHARSET, IW8EBCDIC424S_CHARSET, IW8ISO8859P8_CHARSET, IW8MACHEBREW_CHARSET, IW8MACHEBREWS_CHARSET, IW8MSWIN1255_CHARSET, IW8PC1507_CHARSET, JA16DBCS_CHARSET, JA16EBCDIC930_CHARSET, JA16EUC_CHARSET, JA16EUCTILDE_CHARSET, JA16EUCYEN_CHARSET, JA16MACSJIS_CHARSET, JA16SJIS_CHARSET, JA16SJISTILDE_CHARSET, JA16SJISYEN_CHARSET, JA16TSTSET_CHARSET, JA16TSTSET2_CHARSET, JA16VMS_CHARSET, KO16DBCS_CHARSET, KO16KSC5601_CHARSET, KO16KSCCS_CHARSET, KO16MSWIN949_CHARSET, KO16TSTSET_CHARSET, LA8ISO6937_CHARSET, LA8PASSPORT_CHARSET, LT8MSWIN921_CHARSET, LT8PC772_CHARSET, LT8PC774_CHARSET, LV8PC1117_CHARSET, LV8PC8LR_CHARSET, LV8RST104090_CHARSET, N7SIEMENS9780X_CHARSET, N8PC865_CHARSET, NDK7DEC_CHARSET, NE8ISO8859P10_CHARSET, NEE8ISO8859P4_CHARSET, NL7DEC_CHARSET, RU8BESTA_CHARSET, RU8PC855_CHARSET, RU8PC866_CHARSET, S7DEC_CHARSET, S7SIEMENS9780X_CHARSET, S8BS2000_CHARSET, S8EBCDIC1143_CHARSET, S8EBCDIC278_CHARSET, SE8ISO8859P3_CHARSET, SF7ASCII_CHARSET, SF7DEC_CHARSET, TH8MACTHAI_CHARSET, TH8MACTHAIS_CHARSET, TH8TISASCII_CHARSET, TH8TISEBCDIC_CHARSET, TH8TISEBCDICS_CHARSET, TR7DEC_CHARSET, TR8DEC_CHARSET, TR8EBCDIC1026_CHARSET, TR8EBCDIC1026S_CHARSET, TR8MACTURKISH_CHARSET, TR8MACTURKISHS_CHARSET, TR8MSWIN1254_CHARSET, TR8PC857_CHARSET, UNICODE_1_CHARSET, UNICODE_2_CHARSET, US16TSTFIXED_CHARSET, US7ASCII_CHARSET, US8BS2000_CHARSET, US8ICL_CHARSET, US8NOOP_CHARSET, US8PC437_CHARSET, UTF8_CHARSET, UTFE_CHARSET, VN8MSWIN1258_CHARSET, VN8VN3_CHARSET, WE8BS2000_CHARSET, WE8BS2000E_CHARSET, WE8BS2000L5_CHARSET, WE8DEC_CHARSET, WE8DECTST_CHARSET, WE8DG_CHARSET, WE8EBCDIC1047_CHARSET, WE8EBCDIC1047E_CHARSET, WE8EBCDIC1140_CHARSET, WE8EBCDIC1140C_CHARSET, WE8EBCDIC1145_CHARSET, WE8EBCDIC1146_CHARSET, WE8EBCDIC1148_CHARSET, WE8EBCDIC1148C_CHARSET, WE8EBCDIC284_CHARSET, WE8EBCDIC285_CHARSET, WE8EBCDIC37_CHARSET, WE8EBCDIC37C_CHARSET, WE8EBCDIC500_CHARSET, WE8EBCDIC500C_CHARSET, WE8EBCDIC871_CHARSET, WE8EBCDIC924_CHARSET, WE8GCOS7_CHARSET, WE8HP_CHARSET, WE8ICL_CHARSET, WE8ISO8859P1_CHARSET, WE8ISO8859P15_CHARSET, WE8ISO8859P9_CHARSET, WE8ISOICLUK_CHARSET, WE8MACROMAN8_CHARSET, WE8MACROMAN8S_CHARSET, WE8MSWIN1252_CHARSET, WE8NCR4970_CHARSET, WE8NEXTSTEP_CHARSET, WE8PC850_CHARSET, WE8PC858_CHARSET, WE8PC860_CHARSET, WE8ROMAN8_CHARSET, YUG7ASCII_CHARSET, ZHS16CGB231280_CHARSET, ZHS16DBCS_CHARSET, ZHS16GBK_CHARSET, ZHS16MACCGB231280_CHARSET, ZHS32GB18030_CHARSET, ZHT16BIG5_CHARSET, ZHT16CCDC_CHARSET, ZHT16DBCS_CHARSET, ZHT16DBT_CHARSET, ZHT16HKSCS_CHARSET, ZHT16HKSCS31_CHARSET, ZHT16MSWIN950_CHARSET, ZHT32EUC_CHARSET, ZHT32SOPS_CHARSET, ZHT32TRIS_CHARSET

 

Method Summary
 byte[] convert(CharacterSet from, byte[] source, int offset, int count)
          Converts bytes in some representation to oracleId representation.
 byte[] convert(String s)
          Convert a String to bytes in oracleId representation.
 byte[] convertWithReplacement(String s)
          Convert a String to bytes in oracleId representation.
 boolean isConvertibleFrom(CharacterSet source)
          Are conversions supported.
 boolean isLossyFrom(CharacterSet from)
          A conversion looses information if the mapping is not invertible.
 String toString(byte[] bytes, int offset, int count)
          Convert bytes in oracleId representation to a String.
 String toStringWithReplacement(byte[] bytes, int offset, int count)
          Convert bytes in oracleId representation to a String.

 

Methods inherited from class oracle.sql.CharacterSet
AL16UTF16BytesToJavaChars, AL16UTF16BytesToString, AL32UTF8ToJavaChar, AL32UTF8ToString, AL32UTF8ToString, convertAL16UTF16BytesToJavaChars, convertAL16UTF16LEBytesToJavaChars, convertAL32UTF8BytesToJavaChars, convertAL32UTF8BytesToJavaChars, convertASCIIBytesToJavaChars, convertJavaCharsToAL16UTF16Bytes, convertJavaCharsToAL16UTF16LEBytes, convertJavaCharsToAL32UTF8Bytes, convertJavaCharsToASCIIBytes, convertJavaCharsToASCIIBytes, convertJavaCharsToISOLATIN1Bytes, convertJavaCharsToUTFBytes, convertUnshared, convertUTF32toUTF16, convertUTFBytesToJavaChars, convertUTFBytesToJavaChars, encodedByteLength, encodedByteLength, equals, getConnectionDuringExceptionHandling, getOracleId, hashCode, isUnicode, isUnknown, javaCharsToAL16UTF16Bytes, javaCharsToAL16UTF16LEBytes, make, string32UTF8Length, stringToAL16UTF16Bytes, stringToAL16UTF16LEBytes, stringToAL32UTF8, stringToASCII, stringToUTF, stringUTFLength, toString, UTFToJavaChar, UTFToJavaChar, UTFToJavaCharWithReplacement, UTFToString, UTFToString

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

ccFactory

public static oracle.sql.converter.CharacterConverterFactory ccFactory

BUILD_DATE

public static final String BUILD_DATE
See Also:
Constant Field Values

TRACE

public static final boolean TRACE
See Also:
Constant Field Values

Method Detail

isLossyFrom

public boolean isLossyFrom(CharacterSet from)
Description copied from class: CharacterSet
A conversion looses information if the mapping is not invertible. (A mathematicial would say that the map of characters in from to this is not injective.)
Specified by:
isLossyFrom in class CharacterSet
Parameters:
from - a CharacterSet being tested for compatibility with this CharacterSet.
Returns:
true if characters in the from character set can be mapped uniquely to characters in oracleId representation.

isConvertibleFrom

public boolean isConvertibleFrom(CharacterSet source)
Description copied from class: CharacterSet
Are conversions supported.
Specified by:
isConvertibleFrom in class CharacterSet
Parameters:
source - a CharacterSet to inquire about
Returns:
true if conversion from source to oracleId is supported. If it isn't supported attempts to convert will always throw exceptions.

toStringWithReplacement

public String toStringWithReplacement(byte[] bytes,
                                      int offset,
                                      int count)
Description copied from class: CharacterSet
Convert bytes in oracleId representation to a String. If a character has no Unicode representation the effect is unspecified. The conversion might omit it, or replace it with a special character. The preferred result is replacement by a single character, but it is not guaranteed. If the conversion isn't supported at all, the result may be a fixed string.
Specified by:
toStringWithReplacement in class CharacterSet
Parameters:
bytes - a array containing characters represented in this character set.
offset - the index of the first byte or the charcters
count - the number of bytes to be converted.
Returns:
the String resulting from converting to UCS-2.

toString

public String toString(byte[] bytes,
                       int offset,
                       int count)
                throws SQLException
Description copied from class: CharacterSet
Convert bytes in oracleId representation to a String. The difference between toStringInvertible and plain toString is that toStringInvertible will throw an exception when toString would make some replacement.
Overrides:
toString in class CharacterSet
Parameters:
bytes - a array containing characters represented in this character set.
offset - the index of the first byte or the charcters
count - the number of bytes to be converted.
Returns:
the String resulting from converting to UCS-2.
Throws:
SQLException - when conversion is not supported.

convert

public byte[] convert(String s)
               throws SQLException
Description copied from class: CharacterSet
Convert a String to bytes in oracleId representation.
Specified by:
convert in class CharacterSet
Returns:
an array containing the sequence of bytes in oracleId representation that represent the sequence of Unicode characters in String.
Throws:
SQLException - when the oracleId does not support conversion from Unicode.

convertWithReplacement

public byte[] convertWithReplacement(String s)
Description copied from class: CharacterSet
Convert a String to bytes in oracleId representation. A String is always produced even when the conversion isn't supported or it contains characters that do not have a representation in oracleId. The usual conversion is to replace characters that don't have a representation with some fixed character, but that is not guranteed.
Specified by:
convertWithReplacement in class CharacterSet
Returns:
an array containing the sequence of bytes in oracleId representation that represent the sequence of Unicode characters in String.

convert

public byte[] convert(CharacterSet from,
                      byte[] source,
                      int offset,
                      int count)
               throws SQLException
Description copied from class: CharacterSet
Converts bytes in some representation to oracleId representation. Note that the input is not guaranteed to be different from the output. If a copy is always wanted then use convertUnshared.
Specified by:
convert in class CharacterSet
Parameters:
from - the character set of the input bytes
source - an array of bytes containing the bytes to be converted
offset - the index of the first byte to be converted
count - the number of bytes to be converted
Returns:
a byte array in the Oracle character set
Throws:
SQLException - if the conversion is not supported

Skip navigation links

Oracle® Database JDBC Java API Reference
12c Release 1 (12.1)

E17663-06


Copyright © 2008,2013, Oracle and/or its affiliates. All rights reserved.