oracle.sql
Class NCHAR
java.lang.Object
|
+--oracle.sql.Datum
|
+--oracle.sql.CHAR
|
+--oracle.sql.NCHAR
- public class NCHAR
- extends oracle.sql.CHAR
A variant of the Oracle specific representation of characters.
It is identical to the CHAR representation, except that the mode
of usage are NCHAR character values.
This class is currently only supported in SQLJ.
JDBC must employ the mode-of-use API to set the usage on parameters
and result set columns.
- See Also:
CHAR
Fields inherited from class oracle.sql.CHAR |
DEFAULT_CHARSET |
NCHAR(byte[] bytes,
oracle.sql.CharacterSet charSet)
|
NCHAR(byte[] bytes,
int offset,
int count,
oracle.sql.CharacterSet charSet)
|
NCHAR(oracle.sql.CHAR ch)
Constructor for NCHAR - a variant of CHAR with the mode of use NCHAR. |
NCHAR(java.lang.Object obj,
oracle.sql.CharacterSet charSet)
Constructor for NCHAR - a variant of CHAR with the mode of use NCHAR. |
NCHAR(java.lang.String str,
oracle.sql.CharacterSet charSet)
Constructor for NCHAR - a variant of CHAR with the mode of use NCHAR. |
Methods inherited from class oracle.sql.CHAR |
asciiStreamValue,
bigDecimalValue,
binaryStreamValue,
booleanValue,
byteValue,
characterStreamValue,
dateValue,
doubleValue,
equals,
floatValue,
getCharacterSet,
getString,
getStringWithReplacement,
intValue,
isConvertibleTo,
longValue,
makeJdbcArray,
stringValue,
timestampValue,
timeValue,
toJdbc |
Methods inherited from class oracle.sql.Datum |
compareBytes,
getBytes,
getLength,
getStream,
setBytes,
setShareBytes,
shareBytes |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
NCHAR
public NCHAR(oracle.sql.CHAR ch)
- Constructor for NCHAR - a variant of CHAR with the mode of use NCHAR.
This constructor uses an existing CHAR object.
NCHAR
public NCHAR(java.lang.String str,
oracle.sql.CharacterSet charSet)
throws java.sql.SQLException
- Constructor for NCHAR - a variant of CHAR with the mode of use NCHAR.
The String is first converted to the indicated character set.
No provision is made for loss if the CharacterSet cannot represent
all Unicode characters.
Although perhaps some time in the future it may throw an exception in
that case.
- Parameters:
str
- the sequence of characters (represented in Unicode).charSet
- the CharacterSet to which the string should be converted.- Throws:
- java.sql.SQLException - if the attempt to convert str
to charSet throws
an exception. To avoid this, the program can first use
CharacterSet.convertWithReplacement to get an array of bytes and then
use the byte constructor.
NCHAR
public NCHAR(java.lang.Object obj,
oracle.sql.CharacterSet charSet)
throws java.sql.SQLException
- Constructor for NCHAR - a variant of CHAR with the mode of use NCHAR.
- Parameters:
obj
- input data from which this class instance is
constructed. This constructor calls obj.toString()
to obtain the input string.charSet
- character set of the CHAR to be created.- Throws:
- java.sql.SQLException - if the input argument "obj" is an instance of an
unsupported class, or if the input object cannot be
converted into a CHAR.
NCHAR
public NCHAR(byte[] bytes,
oracle.sql.CharacterSet charSet)
NCHAR
public NCHAR(byte[] bytes,
int offset,
int count,
oracle.sql.CharacterSet charSet)
toString
public java.lang.String toString()
- Overrides:
- toString in class oracle.sql.CHAR