|
Oracle10g JDBC | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.sql.CharacterSet
Encapsulates methods and attributes of the character sets defined by Oracle. Mostly this means conversions between representations. A better name for this class would probably be CharacterRepresentation, but "character set" is how all the Oracle documentation refers to these things.
There are no public constructors. To create a CharacterSet use oracle.sql.CharacterSetFactory. There is no notion of "unsupported" character set. CharacterSet's can be created with any oracleId. However, there is a notion of unsupported conversions And the current implementation is limited to the small number of character sets for which constants are defined in the class
When there are two variants of an operation (e.g. convert vs. convertUnshared) the plain version is the fast (but possibly unsafe) one.
The descriptions of methods in this class use the phrase "bytes in oracleId representation". What this means is that the bytes can be interpreted as a sequence of characters in the character set defined by oracleId. Both what characters are available and how they are represented as sequences of bytes is determined by oracleId.
Method Summary | |
static int |
AL16UTF16BytesToJavaChars(byte[] bytes,
int nbytes,
char[] chars)
Convert a sequence of bytes in AL16UTF16 to an array of chars caller needs to allocate the chars array |
static java.lang.String |
AL16UTF16BytesToString(byte[] bytes,
int nbytes)
Convert a sequence of bytes in AL16UTF16 to a String this function will allocate a chars array |
static char[] |
AL32UTF8ToJavaChar(byte[] bytes,
int offset,
int count)
Converts an AL32UTF8 byte array to an array of char. |
static java.lang.String |
AL32UTF8ToString(byte[] bytes,
int offset,
int nbytes)
Convert a sequence of bytes in AL32UTF8 format to a String. |
abstract byte[] |
convert(CharacterSet from,
byte[] source,
int offset,
int count)
Converts bytes in some representation to oracleId representation. |
abstract byte[] |
convert(java.lang.String s)
Convert a String to bytes in oracleId representation. |
static int |
convertAL16UTF16BytesToJavaChars(byte[] bytes,
int offset,
char[] chars,
int chars_offset,
int count,
boolean convertWithReplacement)
Converts a sequence of bytes in AL16UTF16 to an array of char's. |
static int |
convertAL16UTF16LEBytesToJavaChars(byte[] bytes,
int offset,
char[] chars,
int chars_offset,
int count,
boolean convertWithReplacement)
Converts a sequence of bytes in AL16UTF16LE to an array of char's. |
static int |
convertAL32UTF8BytesToJavaChars(byte[] bytes,
int offsetBytes,
char[] chars,
int offsetChars,
int[] countArr,
boolean convertWithReplacement)
Convert a sequence of bytes in AL32UTF8 to an array of char's. |
static int |
convertAL32UTF8BytesToJavaChars(byte[] bytes,
int offsetBytes,
char[] chars,
int offsetChars,
int[] countArr,
boolean convertWithReplacement,
int charSize)
Same as convertAL32UTF8BytesToJavaChars(byte[],int,char[],int,int[],boolean) with an additional argument 'charSize' which is the number of chars available in the char array. |
static int |
convertASCIIBytesToJavaChars(byte[] bytes,
int bytes_offset,
char[] chars,
int chars_offset,
int count)
convert a byte array in ascii to a Java char array. |
static int |
convertJavaCharsToAL16UTF16Bytes(char[] chars,
int chars_offset,
byte[] bytes,
int bytes_offset,
int nchars)
|
static int |
convertJavaCharsToAL16UTF16LEBytes(char[] chars,
int chars_offset,
byte[] bytes,
int bytes_offset,
int nchars)
|
static int |
convertJavaCharsToAL32UTF8Bytes(char[] chars,
int chars_offset,
byte[] bytes,
int bytes_begin,
int chars_count)
Convert char's to the UTF-8 representation. |
static int |
convertJavaCharsToASCIIBytes(char[] chars,
int chars_offset,
byte[] bytes,
int bytes_offset,
int nchars)
convert a Java char array to a byte array in ascii. |
static int |
convertJavaCharsToISOLATIN1Bytes(char[] chars,
int chars_offset,
byte[] bytes,
int bytes_offset,
int nchars)
|
static int |
convertJavaCharsToUTFBytes(char[] chars,
int chars_offset,
byte[] bytes,
int bytes_begin,
int chars_count)
Convert char's to the UTF8 representation. |
byte[] |
convertUnshared(CharacterSet from,
byte[] source,
int offset,
int count)
Converts bytes in some representation to oracleId representation. |
static long |
convertUTF32toUTF16(long ucs4ch)
|
static int |
convertUTFBytesToJavaChars(byte[] bytes,
int offset,
char[] chars,
int chars_offset,
int[] countArr,
boolean convertWithReplacement)
Convert a sequence of bytes in UTF8 to an array of char's. |
static int |
convertUTFBytesToJavaChars(byte[] bytes,
int offset,
char[] chars,
int chars_offset,
int[] countArr,
boolean convertWithReplacement,
int charSize)
Same as convertUTFBytesToJavaChars(byte[],int,char[],int,int[],boolean) with an additional argument 'charSize' which is the number of chars available in the char array. |
abstract byte[] |
convertWithReplacement(java.lang.String s)
Convert a String to bytes in oracleId representation. |
boolean |
equals(java.lang.Object rhs)
Two CharacterSet's are equal when their oracleId's are equal |
int |
getOracleId()
The integer that identifies the character set. |
int |
hashCode()
Implements a hash based on oracleId |
abstract boolean |
isConvertibleFrom(CharacterSet source)
Are conversions supported. |
abstract boolean |
isLossyFrom(CharacterSet from)
A conversion looses information if the mapping is not invertible. |
boolean |
isUnicode()
Is this a Unicode Character Set. |
static int |
javaCharsToAL16UTF16Bytes(char[] chars,
int nchars,
byte[] bytes)
Convert a sequence of chars in UCS2 to an array of bytes caller needs to allocate the bytes array |
static int |
javaCharsToAL16UTF16LEBytes(char[] chars,
int nchars,
byte[] bytes)
Convert a sequence of chars in UCS2 to an array of bytes caller needs to allocate the bytes array |
static CharacterSet |
make(int oracleId)
Factory. |
static int |
string32UTF8Length(java.lang.String s)
Returns the number of bytes in the UTF-8 representation of a String |
static byte[] |
stringToAL16UTF16Bytes(java.lang.String str)
Convert a String to an array of bytes this function will allocate the bytes array |
static byte[] |
stringToAL16UTF16LEBytes(java.lang.String str)
Convert a String to an array of bytes this function will allocate the bytes array |
static byte[] |
stringToAL32UTF8(java.lang.String str)
|
static byte[] |
stringToASCII(java.lang.String str)
convert a String to a byte array in ascii. |
static byte[] |
stringToUTF(java.lang.String str)
Convert the str to a byte array that in UTF8 representation. |
static int |
stringUTFLength(java.lang.String s)
Returns the number of bytes in the UTF16 representation of a String |
java.lang.String |
toString()
This should be the official name of the character set. |
java.lang.String |
toString(byte[] bytes,
int offset,
int count)
Convert bytes in oracleId representation to a String. |
abstract java.lang.String |
toStringWithReplacement(byte[] bytes,
int offset,
int count)
Convert bytes in oracleId representation to a String. |
static char[] |
UTFToJavaChar(byte[] bytes,
int offset,
int count)
Convert a sequence of bytes in UTF8 to an array of char's. |
static char[] |
UTFToJavaCharWithReplacement(byte[] bytes,
int offset,
int count)
Convert a sequence of bytes in UTF8 to an array of char's. |
static java.lang.String |
UTFToString(byte[] bytes,
int offset,
int nbytes)
Convert a sequence of bytes in UTF8 to a String this function will to allocate the chars array |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final short DEFAULT_CHARSET
public static final short ASCII_CHARSET
public static final short ISO_LATIN_1_CHARSET
public static final short UNICODE_1_CHARSET
public static final short US7ASCII_CHARSET
public static final short WE8DEC_CHARSET
public static final short WE8HP_CHARSET
public static final short US8PC437_CHARSET
public static final short WE8EBCDIC37_CHARSET
public static final short WE8EBCDIC500_CHARSET
public static final short WE8EBCDIC285_CHARSET
public static final short WE8PC850_CHARSET
public static final short D7DEC_CHARSET
public static final short F7DEC_CHARSET
public static final short S7DEC_CHARSET
public static final short E7DEC_CHARSET
public static final short SF7ASCII_CHARSET
public static final short NDK7DEC_CHARSET
public static final short I7DEC_CHARSET
public static final short NL7DEC_CHARSET
public static final short CH7DEC_CHARSET
public static final short YUG7ASCII_CHARSET
public static final short SF7DEC_CHARSET
public static final short TR7DEC_CHARSET
public static final short IW7IS960_CHARSET
public static final short IN8ISCII_CHARSET
public static final short WE8ISO8859P1_CHARSET
public static final short EE8ISO8859P2_CHARSET
public static final short SE8ISO8859P3_CHARSET
public static final short NEE8ISO8859P4_CHARSET
public static final short CL8ISO8859P5_CHARSET
public static final short AR8ISO8859P6_CHARSET
public static final short EL8ISO8859P7_CHARSET
public static final short IW8ISO8859P8_CHARSET
public static final short WE8ISO8859P9_CHARSET
public static final short NE8ISO8859P10_CHARSET
public static final short TH8TISASCII_CHARSET
public static final short TH8TISEBCDIC_CHARSET
public static final short BN8BSCII_CHARSET
public static final short VN8VN3_CHARSET
public static final short VN8MSWIN1258_CHARSET
public static final short WE8NEXTSTEP_CHARSET
public static final short AR8ASMO708PLUS_CHARSET
public static final short AR8EBCDICX_CHARSET
public static final short AR8XBASIC_CHARSET
public static final short EL8DEC_CHARSET
public static final short TR8DEC_CHARSET
public static final short WE8EBCDIC37C_CHARSET
public static final short WE8EBCDIC500C_CHARSET
public static final short IW8EBCDIC424_CHARSET
public static final short TR8EBCDIC1026_CHARSET
public static final short WE8EBCDIC871_CHARSET
public static final short WE8EBCDIC284_CHARSET
public static final short WE8EBCDIC1047_CHARSET
public static final short EEC8EUROASCI_CHARSET
public static final short EEC8EUROPA3_CHARSET
public static final short LA8PASSPORT_CHARSET
public static final short BG8PC437S_CHARSET
public static final short EE8PC852_CHARSET
public static final short RU8PC866_CHARSET
public static final short RU8BESTA_CHARSET
public static final short IW8PC1507_CHARSET
public static final short RU8PC855_CHARSET
public static final short TR8PC857_CHARSET
public static final short CL8MACCYRILLIC_CHARSET
public static final short CL8MACCYRILLICS_CHARSET
public static final short WE8PC860_CHARSET
public static final short IS8PC861_CHARSET
public static final short EE8MACCES_CHARSET
public static final short EE8MACCROATIANS_CHARSET
public static final short TR8MACTURKISHS_CHARSET
public static final short IS8MACICELANDICS_CHARSET
public static final short EL8MACGREEKS_CHARSET
public static final short IW8MACHEBREWS_CHARSET
public static final short EE8MSWIN1250_CHARSET
public static final short CL8MSWIN1251_CHARSET
public static final short ET8MSWIN923_CHARSET
public static final short BG8MSWIN_CHARSET
public static final short EL8MSWIN1253_CHARSET
public static final short IW8MSWIN1255_CHARSET
public static final short LT8MSWIN921_CHARSET
public static final short TR8MSWIN1254_CHARSET
public static final short WE8MSWIN1252_CHARSET
public static final short BLT8MSWIN1257_CHARSET
public static final short D8EBCDIC273_CHARSET
public static final short I8EBCDIC280_CHARSET
public static final short DK8EBCDIC277_CHARSET
public static final short S8EBCDIC278_CHARSET
public static final short EE8EBCDIC870_CHARSET
public static final short CL8EBCDIC1025_CHARSET
public static final short F8EBCDIC297_CHARSET
public static final short IW8EBCDIC1086_CHARSET
public static final short CL8EBCDIC1025X_CHARSET
public static final short N8PC865_CHARSET
public static final short BLT8CP921_CHARSET
public static final short LV8PC1117_CHARSET
public static final short LV8PC8LR_CHARSET
public static final short BLT8EBCDIC1112_CHARSET
public static final short LV8RST104090_CHARSET
public static final short CL8KOI8R_CHARSET
public static final short BLT8PC775_CHARSET
public static final short F7SIEMENS9780X_CHARSET
public static final short E7SIEMENS9780X_CHARSET
public static final short S7SIEMENS9780X_CHARSET
public static final short DK7SIEMENS9780X_CHARSET
public static final short N7SIEMENS9780X_CHARSET
public static final short I7SIEMENS9780X_CHARSET
public static final short D7SIEMENS9780X_CHARSET
public static final short WE8GCOS7_CHARSET
public static final short EL8GCOS7_CHARSET
public static final short US8BS2000_CHARSET
public static final short D8BS2000_CHARSET
public static final short F8BS2000_CHARSET
public static final short E8BS2000_CHARSET
public static final short DK8BS2000_CHARSET
public static final short S8BS2000_CHARSET
public static final short WE8BS2000_CHARSET
public static final short CL8BS2000_CHARSET
public static final short WE8BS2000L5_CHARSET
public static final short WE8DG_CHARSET
public static final short WE8NCR4970_CHARSET
public static final short WE8ROMAN8_CHARSET
public static final short EE8MACCE_CHARSET
public static final short EE8MACCROATIAN_CHARSET
public static final short TR8MACTURKISH_CHARSET
public static final short IS8MACICELANDIC_CHARSET
public static final short EL8MACGREEK_CHARSET
public static final short IW8MACHEBREW_CHARSET
public static final short US8ICL_CHARSET
public static final short WE8ICL_CHARSET
public static final short WE8ISOICLUK_CHARSET
public static final short WE8MACROMAN8_CHARSET
public static final short WE8MACROMAN8S_CHARSET
public static final short TH8MACTHAI_CHARSET
public static final short TH8MACTHAIS_CHARSET
public static final short HU8CWI2_CHARSET
public static final short EL8PC437S_CHARSET
public static final short EL8EBCDIC875_CHARSET
public static final short EL8PC737_CHARSET
public static final short LT8PC772_CHARSET
public static final short LT8PC774_CHARSET
public static final short EL8PC869_CHARSET
public static final short EL8PC851_CHARSET
public static final short CDN8PC863_CHARSET
public static final short HU8ABMOD_CHARSET
public static final short AR8ASMO8X_CHARSET
public static final short AR8NAFITHA711T_CHARSET
public static final short AR8SAKHR707T_CHARSET
public static final short AR8MUSSAD768T_CHARSET
public static final short AR8ADOS710T_CHARSET
public static final short AR8ADOS720T_CHARSET
public static final short AR8APTEC715T_CHARSET
public static final short AR8NAFITHA721T_CHARSET
public static final short AR8HPARABIC8T_CHARSET
public static final short AR8NAFITHA711_CHARSET
public static final short AR8SAKHR707_CHARSET
public static final short AR8MUSSAD768_CHARSET
public static final short AR8ADOS710_CHARSET
public static final short AR8ADOS720_CHARSET
public static final short AR8APTEC715_CHARSET
public static final short AR8MSAWIN_CHARSET
public static final short AR8NAFITHA721_CHARSET
public static final short AR8SAKHR706_CHARSET
public static final short AR8ARABICMAC_CHARSET
public static final short AR8ARABICMACS_CHARSET
public static final short AR8ARABICMACT_CHARSET
public static final short LA8ISO6937_CHARSET
public static final short US8NOOP_CHARSET
public static final short WE8DECTST_CHARSET
public static final short JA16VMS_CHARSET
public static final short JA16EUC_CHARSET
public static final short JA16EUCYEN_CHARSET
public static final short JA16SJIS_CHARSET
public static final short JA16DBCS_CHARSET
public static final short JA16SJISYEN_CHARSET
public static final short JA16EBCDIC930_CHARSET
public static final short JA16MACSJIS_CHARSET
public static final short JA16EUCTILDE_CHARSET
public static final short JA16SJISTILDE_CHARSET
public static final short KO16KSC5601_CHARSET
public static final short KO16DBCS_CHARSET
public static final short KO16KSCCS_CHARSET
public static final short KO16MSWIN949_CHARSET
public static final short ZHS16CGB231280_CHARSET
public static final short ZHS16MACCGB231280_CHARSET
public static final short ZHS16GBK_CHARSET
public static final short ZHS16DBCS_CHARSET
public static final short ZHS32GB18030
public static final short ZHS16MSWIN936_CHARSET
public static final short ZHT32EUC_CHARSET
public static final short ZHT32SOPS_CHARSET
public static final short ZHT16DBT_CHARSET
public static final short ZHT32TRIS_CHARSET
public static final short ZHT16DBCS_CHARSET
public static final short ZHT16BIG5_CHARSET
public static final short ZHT16CCDC_CHARSET
public static final short ZHT16MSWIN950_CHARSET
public static final short AL24UTFFSS_CHARSET
public static final short UTF8_CHARSET
public static final short UTFE_CHARSET
public static final short AL32UTF8_CHARSET
public static final short KO16TSTSET_CHARSET
public static final short JA16TSTSET2_CHARSET
public static final short JA16TSTSET_CHARSET
public static final short US16TSTFIXED_CHARSET
public static final short JA16EUCFIXED_CHARSET
public static final short JA16SJISFIXED_CHARSET
public static final short JA16DBCSFIXED_CHARSET
public static final short KO16KSC5601FIXED_CHARSET
public static final short KO16DBCSFIXED_CHARSET
public static final short ZHS16CGB231280FIXED_CHARSET
public static final short ZHS16GBKFIXED_CHARSET
public static final short ZHS16DBCSFIXED_CHARSET
public static final short ZHT32EUCFIXED_CHARSET
public static final short ZHT32TRISFIXED_CHARSET
public static final short ZHT16DBCSFIXED_CHARSET
public static final short ZHT16BIG5FIXED_CHARSET
public static final short AL16UTF16_CHARSET
public static final short AL16UTF16LE_CHARSET
public static final short UNICODE_2_CHARSET
public static final boolean TRACE
public static final boolean PRIVATE_TRACE
public static final java.lang.String BUILD_DATE
Method Detail |
public static CharacterSet make(int oracleId)
oracleId
- the number of the Oracle character set. A list of
official Oracle character sets is maintained by ...
public java.lang.String toString()
public abstract boolean isLossyFrom(CharacterSet from)
from
- a CharacterSet being tested for compatibility with this
CharacterSet.
public abstract boolean isConvertibleFrom(CharacterSet source)
source
- a CharacterSet to inquire about
public boolean isUnicode()
public int getOracleId()
public boolean equals(java.lang.Object rhs)
rhs
- the target character set
true
if the given CharacterSet object equals to this
objectpublic int hashCode()
public abstract java.lang.String toStringWithReplacement(byte[] bytes, int offset, int count)
bytes
- a array containing characters represented in this character
set.offset
- the index of the first byte or the charcterscount
- the number of bytes to be converted.
public java.lang.String toString(byte[] bytes, int offset, int count) throws java.sql.SQLException
bytes
- a array containing characters represented in this character
set.offset
- the index of the first byte or the charcterscount
- the number of bytes to be converted.
java.sql.SQLException
- when conversion is not supported.public abstract byte[] convert(java.lang.String s) throws java.sql.SQLException
java.sql.SQLException
- when the oracleId does not support conversion from
Unicode.
java.sql.SQLException
- when s contains a character that cannot be
converted.public abstract byte[] convertWithReplacement(java.lang.String s)
public abstract byte[] convert(CharacterSet from, byte[] source, int offset, int count) throws java.sql.SQLException
from
- the character set of the input bytessource
- an array of bytes containing the bytes to be convertedoffset
- the index of the first byte to be convertedcount
- the number of bytes to be converted
java.sql.SQLException
- if the conversion is not supported
java.sql.SQLException
- if some character cannot be converted. This
exception is not guaranteed to be thrown. For some conversions
a replacement character may be used instead.public byte[] convertUnshared(CharacterSet from, byte[] source, int offset, int count) throws java.sql.SQLException
from
- the character set of the input bytessource
- an array of bytes containing the bytes to be convertedoffset
- the index of the first byte to be convertedcount
- the number of bytes to be converted
java.sql.SQLException
- if the conversion is not supported.public static final java.lang.String UTFToString(byte[] bytes, int offset, int nbytes)
bytes
- containing the UTF8 stringnbytes
- of bytes
public static final char[] UTFToJavaChar(byte[] bytes, int offset, int count) throws java.sql.SQLException
bytes
- the array holding the UTF8 bytesoffset
- the index of the first bytecount
- the number of bytes in the UFT8 sequence.
java.sql.SQLException
- if any error occurspublic static final char[] UTFToJavaCharWithReplacement(byte[] bytes, int offset, int count)
bytes
- the array holding the UTF8 bytesoffset
- the index of the first bytecount
- the number of bytes in the UFT8 sequence.
java.lang.IllegalStateException
- if any error occurspublic static final int convertUTFBytesToJavaChars(byte[] bytes, int offset, char[] chars, int chars_offset, int[] countArr, boolean convertWithReplacement) throws java.sql.SQLException
bytes
- the array holding the UTF8 bytesoffset
- the index of the first bytechars
- the array of holding the UTF-16 char arraychars_offset
- the idnex of the first char that will be writtencountArr
- IN/OUT parameter. countArr[0](IN) contains the number of bytes
in the UTF8 sequence that need to be converted.convertWithReplacement
- set to true to use replacement character for illegal
sequences
java.sql.SQLException
- if invalid, illegal UTF data is givenpublic static final int convertUTFBytesToJavaChars(byte[] bytes, int offset, char[] chars, int chars_offset, int[] countArr, boolean convertWithReplacement, int charSize) throws java.sql.SQLException
java.sql.SQLException
public static final byte[] stringToUTF(java.lang.String str)
public static final int convertJavaCharsToUTFBytes(char[] chars, int chars_offset, byte[] bytes, int bytes_begin, int chars_count)
No validation is
performed.
chars
- a source string in an array of charschars_offset
- an offset to start copying in the source stringchars_count
- a length to copy from the source stringbytes
- a destination byte arraybytes_begin
- an offset to start copying in the destination byte
array
public static final int stringUTFLength(java.lang.String s)
This method doesn't check neither invalid- nor illegal-UTF sequence.
s
- a UTF-16 string to count the number of bytes in the string
public static final java.lang.String AL32UTF8ToString(byte[] bytes, int offset, int nbytes)
bytes
- containing the AL32UTF8 stringoffset
- an offset to start conversionnbytes
- of bytes
public static final char[] AL32UTF8ToJavaChar(byte[] bytes, int offset, int count) throws java.sql.SQLException
bytes
- an AL32UTF8 byte arrayoffset
- an offset to start conversioncount
- number of bytes to be converted.
java.sql.SQLException
public static final int convertAL32UTF8BytesToJavaChars(byte[] bytes, int offsetBytes, char[] chars, int offsetChars, int[] countArr, boolean convertWithReplacement) throws java.sql.SQLException
bytes
- the array holding the AL32UTF8 bytesoffsetBytes
- the index of the first bytechars
- the array of holding the UTF-16 char arrayoffsetChars
- the index of the first char that will be writtencountArr
- IN/OUT parameter. countArr[0](IN) contains the number of bytes
in the UTF8 sequence that need to be converted.convertWithReplacement
- set to true to use replacement character for illegal
sequences
java.sql.SQLException
- if invalid, illegal UTF data is givenpublic static final int convertAL32UTF8BytesToJavaChars(byte[] bytes, int offsetBytes, char[] chars, int offsetChars, int[] countArr, boolean convertWithReplacement, int charSize) throws java.sql.SQLException
java.sql.SQLException
public static final byte[] stringToAL32UTF8(java.lang.String str)
public static final int convertJavaCharsToAL32UTF8Bytes(char[] chars, int chars_offset, byte[] bytes, int bytes_begin, int chars_count)
No validation is
performed except surrogate pairs
chars
- a source string in an array of charschars_offset
- an offset to start copying in the source stringbytes
- a destination byte arraybytes_begin
- an offset to start copying in the destination byte
arraychars_count
- a length to copy from the source string
public static final int string32UTF8Length(java.lang.String s)
This method doesn't check neither invalid- nor illegal-UTF sequence.
s
- a UTF-16 string to count the number of bytes in UTF8 format
public static final java.lang.String AL16UTF16BytesToString(byte[] bytes, int nbytes)
bytes
- containing the AL16UTF16 stringnbytes
- of bytes
public static final int AL16UTF16BytesToJavaChars(byte[] bytes, int nbytes, char[] chars)
bytes
- containing the AL16UTF16 stringnbytes
- of byteschars
- char array which the UCS2 string will be returned in
public static final int convertAL16UTF16BytesToJavaChars(byte[] bytes, int offset, char[] chars, int chars_offset, int count, boolean convertWithReplacement) throws java.sql.SQLException
bytes
- the array holding the AL16UTF16 bytesoffset
- the index of the first bytechars
- the array of holding the UTF-16 char arraychars_offset
- the index of the first charcount
- the number of bytes in the AL16UTF16 sequence.convertWithReplacement
- set to true to use replacement character for illegal
java.sql.SQLException
- if invalid, illegal UTF data is givenpublic static final int convertAL16UTF16LEBytesToJavaChars(byte[] bytes, int offset, char[] chars, int chars_offset, int count, boolean convertWithReplacement) throws java.sql.SQLException
bytes
- the array holding the AL16UTF16LE bytesoffset
- the index of the first bytechars
- the array of holding the UTF16UTF16LE char arraychars_offset
- the index of the first charcount
- the number of bytes in the AL16UTF16LE sequence.convertWithReplacement
- set to true to use replacement character for illegal
java.sql.SQLException
- if invalid, illegal UTF data is givenpublic static final byte[] stringToAL16UTF16Bytes(java.lang.String str)
str
- containing the UCS2 string
public static final int javaCharsToAL16UTF16Bytes(char[] chars, int nchars, byte[] bytes)
chars
- containing the UCS2 stringnchars
- of charsbytes
- byte array which the AL16UTF16 string will be returned in
public static final int convertJavaCharsToAL16UTF16Bytes(char[] chars, int chars_offset, byte[] bytes, int bytes_offset, int nchars)
public static final byte[] stringToAL16UTF16LEBytes(java.lang.String str)
str
- containing the UCS2 string
public static final int javaCharsToAL16UTF16LEBytes(char[] chars, int nchars, byte[] bytes)
chars
- containing the UCS2 stringnchars
- of charsbytes
- byte array which the AL16UTF16LE string will be returned in
public static final int convertJavaCharsToAL16UTF16LEBytes(char[] chars, int chars_offset, byte[] bytes, int bytes_offset, int nchars)
public static final int convertASCIIBytesToJavaChars(byte[] bytes, int bytes_offset, char[] chars, int chars_offset, int count) throws java.sql.SQLException
bytes
- input bytesbytes_offset
- the starting position to convertchars
- output Java char array (buffer is allocated by the caller)chars_offset
- starting position to store the Java char array
java.sql.SQLException
- if errors occurredpublic static final int convertJavaCharsToASCIIBytes(char[] chars, int chars_offset, byte[] bytes, int bytes_offset, int nchars) throws java.sql.SQLException
chars
- input Java char arraychars_offset
- input the starting position to convertbytes
- output the converted byte array in asciibytes_offset
- input the starting position to hold
the returning bytes
java.sql.SQLException
- if errors occurredpublic static final int convertJavaCharsToISOLATIN1Bytes(char[] chars, int chars_offset, byte[] bytes, int bytes_offset, int nchars) throws java.sql.SQLException
java.sql.SQLException
public static final byte[] stringToASCII(java.lang.String str)
str
- input the String to be converted
public static final long convertUTF32toUTF16(long ucs4ch)
|
Oracle10g JDBC | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |