|
Oracle Multimedia Java API Reference 11g Release 1 (11.1) Part No. B28413-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ord.im.OrdMediaUtil
public class OrdMediaUtil
The OrdMediaUtil class allows other Oracle Multimedia Java classes to connect to Oracle Database and access data in tables that contain columns of Oracle Multimedia object types. This class includes methods for downloading and uploading data.
Users of this class should be familiar with Oracle Multimedia 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 Multimedia 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. |
static void |
write(java.io.InputStream inStream, java.io.OutputStream outStream) Reads the InputStream object and writes to the OutputStream object. |
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 void write(java.io.InputStream inStream, java.io.OutputStream outStream) throws java.io.IOException
inStream
- the name of the InputStream
object from which the data is read.outStream
- the name of the OutputStream
object to which data is written.java.io.IOException
- if an error occurs reading the data from the InputStream object or writing the data to the OutputStream object, or the InputStream object or the OutputStream object is null.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 Multimedia Java API Reference 11g Release 1 (11.1) Part No. B28413-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |