|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.sql.Datum | +--oracle.sql.CHAR
The Oracle specific representation of characters. The class extends oracle.sql.Datum and interprets the bytes according to one of the Oracle supported character sets. Each object of type oracle.sql.CHAR contains an indication of what character set to use in interpreting the bytes so one class can be used all all the variations, such as National Character Set, Client, Database, etc.
For conversions that are not supported directly by CHAR (e.g. "best effort" conversions from String) the programmer can a "best attempt" is wanted even when the conversion looses information, the "withReplacement" methods of oracle.sql.CharacterSet can be used directly.
CharacterSet
Field Summary |
Type | Field |
---|---|
static oracle.sql.CharacterSet |
DEFAULT_CHARSET
|
Constructor Summary |
CHAR(java.lang.Object obj,
oracle.sql.CharacterSet charSet)
Construct a CHAR from an Object. |
CHAR(java.lang.String str,
oracle.sql.CharacterSet charSet)
Constructor for CHAR. |
Method Summary |
Type | Method |
---|---|
java.io.InputStream |
asciiStreamValue()
Convert to an ascii stream representation of the datum object |
java.math.BigDecimal |
bigDecimalValue()
Convert this data object into a BigDecimal. |
java.io.InputStream |
binaryStreamValue()
Convert to a binary stream representation of the datum object |
boolean |
booleanValue()
Convert to a boolean representation of the datum object |
byte |
byteValue()
Convert to a byte representation of the datum object |
java.io.Reader |
characterStreamValue()
Convert to a character stream representation of the datum object |
java.sql.Date |
dateValue()
Convert to a Date representation of the datum object |
double |
doubleValue()
Convert to a double representation of the datum object |
float |
floatValue()
Convert to a float representation of the datum object |
java.lang.String |
getString()
Converts the sequence of characters represented by this to a String. |
int |
intValue()
Convert to a integer representation of the datum object |
boolean |
isConvertibleTo(java.lang.Class jClass)
Test whether this data object can be converted to the specified Java data type. |
long |
longValue()
Convert to a long representation of the datum object |
java.lang.String |
stringValue()
Convert this data object into a String. |
java.sql.Timestamp |
timestampValue()
Convert to a Timestamp representation of the datum object |
java.sql.Time |
timeValue()
Convert to a Time representation of the datum object |
java.lang.Object |
toJdbc()
Convert this data object into its default Java object type. |
java.lang.String |
toString()
Converts the characters to a String. |
Methods inherited from class oracle.sql.Datum |
equals,
getBytes,
getLength,
getStream,
makeJdbcArray,
setBytes,
setShareBytes,
shareBytes |
Methods inherited from class java.lang.Object |
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final oracle.sql.CharacterSet DEFAULT_CHARSET
Constructor Detail |
public CHAR(java.lang.String str, oracle.sql.CharacterSet charSet) throws java.sql.SQLException
str
- the sequence of characters (represented in Unicode).charSet
- the CharacterSet to which the string should be converted.public CHAR(java.lang.Object obj, oracle.sql.CharacterSet charSet) throws java.sql.SQLException
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.Method Detail |
public java.lang.String getString() throws java.sql.SQLException
public java.lang.String toString()
public java.lang.Object toJdbc() throws java.sql.SQLException
public boolean isConvertibleTo(java.lang.Class jClass)
jClass
- specifies the Java data type to test against.public java.lang.String stringValue()
public boolean booleanValue() throws java.sql.SQLException
public int intValue() throws java.sql.SQLException
public long longValue() throws java.sql.SQLException
public float floatValue() throws java.sql.SQLException
public double doubleValue() throws java.sql.SQLException
public byte byteValue() throws java.sql.SQLException
public java.sql.Date dateValue() throws java.sql.SQLException
public java.sql.Time timeValue() throws java.sql.SQLException
public java.sql.Timestamp timestampValue() throws java.sql.SQLException
public java.math.BigDecimal bigDecimalValue() throws java.sql.SQLException
public java.io.Reader characterStreamValue() throws java.sql.SQLException
public java.io.InputStream asciiStreamValue() throws java.sql.SQLException
public java.io.InputStream binaryStreamValue() throws java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |