|
Oracle interMedia Java Classes API Reference 10g Release 2 (10.2) Part No. B14301-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ord.im.OrdMediaUtil
The OrdMediaUtil class allows other interMedia Java classes to connect to Oracle Database and access data in tables that contain columns of interMedia object types. This class includes methods for downloading and uploading data.
Users of this class should be familiar with Oracle interMedia Reference.
Before running OrdMediaUtil methods, the following operations must have already been performed:
For examples of making a connection and populating a local object, see Oracle interMedia User's Guide.
Method Summary | |
static byte[] |
getDataInByteArray(oracle.sql.BLOB mediaLobLocator) Downloads data from a database object to a byte array. |
static boolean |
getDataInFile(java.lang.String filename, oracle.sql.BLOB mediaLobLocator) Downloads data from a database object to the specified file. |
static void |
imCompatibilityInit(oracle.jdbc.OracleConnection con) Deprecated. This method is no longer needed. |
static void |
imCompatibilityInit(oracle.jdbc.driver.OracleConnection con) Deprecated. This method is no longer needed. |
static boolean |
loadData(java.lang.String filename, oracle.sql.BLOB mediaLobLocator) Loads data from the specified file to a BLOB. |
static boolean |
loadDataFromByteArray(byte[] byteArr, oracle.sql.BLOB mediaLobLocator) Loads data from a byte array to a BLOB. |
static boolean |
loadDataFromInputStream(java.io.InputStream inStream, oracle.sql.BLOB mediaLobLocator) Loads data from an InputStream object to a BLOB. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void imCompatibilityInit(oracle.jdbc.OracleConnection con) throws java.lang.Exception
java.lang.Exception
public static void imCompatibilityInit(oracle.jdbc.driver.OracleConnection con) throws java.lang.Exception
java.lang.Exception
public static boolean loadData(java.lang.String filename, oracle.sql.BLOB mediaLobLocator) throws java.sql.SQLException, java.io.IOException
filename
- the name of the file from which the data is loaded.mediaLobLocator
- the BLOB into which the data is loaded.true
if the load is successful; false
otherwise.java.sql.SQLException
- if an error occurs accessing an object attribute or executing a method in the database.java.io.IOException
- if an error occurs reading the data file.public static boolean loadDataFromInputStream(java.io.InputStream inStream, oracle.sql.BLOB mediaLobLocator) throws java.sql.SQLException, java.io.IOException, java.lang.OutOfMemoryError
inStream
- the name of the InputStream
object from which the data is loaded.mediaLobLocator
- the BLOB into which the data is loaded.true
if the load is successful; false
otherwise.java.sql.SQLException
- if an error occurs accessing an object attribute or executing a method in the database.java.io.IOException
- if an error occurs reading the InputStream object.java.lang.OutOfMemoryError
- if sufficient memory cannot be allocated to hold the data.public static boolean loadDataFromByteArray(byte[] byteArr, oracle.sql.BLOB mediaLobLocator) throws java.sql.SQLException, java.io.IOException
byteArr
- the name of the byte []
array from which the data is loaded.mediaLobLocator
- the BLOB into which the data is loaded.true
if the load is successful, false
otherwise.java.sql.SQLException
- if an error occurs accessing an object attribute or executing a method in the database.java.io.IOException
- if an error occurs reading the byte array.public static boolean getDataInFile(java.lang.String filename, oracle.sql.BLOB mediaLobLocator) throws java.sql.SQLException, java.io.IOException
filename
- the name of the file into which the data is downloaded.mediaLobLocator
- the BLOB from which the data is downloaded.true
if the download is successful; false
otherwise.java.sql.SQLException
- if an error occurs accessing an object attribute.java.io.IOException
- if an error occurs reading the data from the BLOB or writing the data to the output file.public static byte[] getDataInByteArray(oracle.sql.BLOB mediaLobLocator) throws java.sql.SQLException, java.io.IOException, java.lang.OutOfMemoryError
mediaLobLocator
- the BLOB from which data is downloaded, and which returns a byte array containing downloaded data.java.sql.SQLException
- if an error occurs accessing an object attribute.java.io.IOException
- if an error occurs reading the data from the BLOB.java.lang.OutOfMemoryError
- if sufficient memory cannot be allocated to hold the data.
|
Oracle interMedia Java Classes API Reference 10g Release 2 (10.2) Part No. B14301-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |