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.
public class OrdMediaUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getDataInByteArray(oracle.sql.BLOB mediaLobLocator)
Deprecated.
Downloads data from a database object to a byte array.
|
static boolean |
getDataInFile(java.lang.String filename, oracle.sql.BLOB mediaLobLocator)
Deprecated.
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)
Deprecated.
Loads data from the specified file to a BLOB.
|
static boolean |
loadDataFromByteArray(byte[] byteArr, oracle.sql.BLOB mediaLobLocator)
Deprecated.
Loads data from a byte array to a BLOB.
|
static boolean |
loadDataFromInputStream(java.io.InputStream inStream, oracle.sql.BLOB mediaLobLocator)
Deprecated.
Loads data from an InputStream object to a BLOB.
|
static void |
write(java.io.InputStream inStream, java.io.OutputStream outStream)
Deprecated.
Reads the InputStream object and writes to the OutputStream object.
|
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.