|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.sql.Datum oracle.sql.RAW
public class RAW
The RAW class is a representation of the Oracle RAW datatype. It is intended to be immutable. The user should not try to change its contents once it is constructed.
Field Summary | |
---|---|
static java.lang.String |
BUILD_DATE
|
static boolean |
TRACE
|
Constructor Summary | |
---|---|
RAW(byte[] raw_bytes)
Construct a RAW from a byte array. |
|
RAW(java.lang.Object val)
Deprecated. in 9.2. The behavior of this constructor when passed a String argument will be changed in the next major release after 9.2. There will be no change in the behavior when passed an argument of any other type. The static methods newRAW and oldRAW capture the new and old behavior. It is deprecated only to warn of the impending change in behavior. The deprecation will be removed in the next major release after 9.2. The constructor will remain and will be supported. See release notes for more info. |
Method Summary | |
---|---|
static byte[] |
hexString2Bytes(java.lang.String hexString)
Converts a String of hex digits into a byte array with the corresponding byte values. |
boolean |
isConvertibleTo(java.lang.Class jClass)
Test whether this data object can be converted to the specified Java data type. |
static RAW |
newRAW(java.lang.Object obj)
Creates a new RAW from an Object in the manner of the RAW(Object) constructor beginning in 10i R1. |
static RAW |
oldRAW(java.lang.Object obj)
Creates a new RAW from an Object in the manner of the RAW(Object) constructor in versions of Oracle JDBC 9.2 and earlier. |
java.lang.String |
stringValue()
Convert this data object into a String. |
java.lang.Object |
toJdbc()
Convert this data object into its default Java object type. |
Methods inherited from class oracle.sql.Datum |
---|
bigDecimalValue, booleanValue, byteValue, dateValue, doubleValue, equals, floatValue, getBytes, getLength, getStream, intValue, longValue, setBytes, setShareBytes, shareBytes, stringValue, timestampValue, timestampValue, timeValue, timeValue |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BUILD_DATE
public static final boolean TRACE
Constructor Detail |
---|
public RAW(byte[] raw_bytes)
raw_bytes
- input data from which this class instance is
constructed.public RAW(java.lang.Object val) throws java.sql.SQLException
val
- input data from which this class instance is
constructed.
java.sql.SQLException
#newRAW(Object), #oldRAW(Object)
Method Detail |
---|
public static byte[] hexString2Bytes(java.lang.String hexString) throws java.sql.SQLException
hexString
- A String of hex digits
java.sql.SQLException
- if one of the characters in the argument is not a hex digitpublic static RAW newRAW(java.lang.Object obj) throws java.sql.SQLException
In Oracle JDBC versions beginning in 10i R1 this is identical to RAW(Object). In versions 9.2 and earlier, it provides the functionality that will be provided in versions beginning in 10i R1.
Note that the behavior of RAW(Object) when passed a String argument changed in 10i R1.
obj
- Object used to create the new RAW value
java.sql.SQLException
- if the argument is a String and one of the characters is not
a hex digitoldRAW
public static RAW oldRAW(java.lang.Object obj) throws java.sql.SQLException
In Oracle JDBC versions 9.2 and earlier this is identical to the RAW(Object) constructor. Beginning in 10i R1, it provides the functionality that previously was provided by that constructor.
Note that the behavior of RAW(Object) when passed a String argument changed in 10i R1.
obj
- Object used to create the RAW value
java.sql.SQLException
- if something goes wrongnewRAW
public java.lang.Object toJdbc() throws java.sql.SQLException
toJdbc
in class Datum
java.sql.SQLException
- if any of the lower layer code throws an exception.public boolean isConvertibleTo(java.lang.Class jClass)
isConvertibleTo
in class Datum
jClass
- specifies the Java data type to test against.
public java.lang.String stringValue()
stringValue
in class Datum
|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |