Oracle8i interMedia Audio, Image, and Video Java Client User's Guide and Reference Release 8.1.5 A67296-01 |
|
Oracle8i interMedia Audio, Image, and Video Java Client contains information about the ORDMultiMedia:
Oracle8i interMedia Audio, Image, and Video Java Client contains information about the BindToTableParams:
Methods invoked at the ORDMultiMedia level that are handed off for processing to the server-side source plug-in have byte[ ] ctx
as a context parameter. The space for the parameter is created by the client (in the reference examples, 4000 bytes of space), but the content of the context parameter is generated by the server. The context parameter is passed from the client to the server for the processing of context information.
See Oracle8i interMedia Audio, Image, and Video User's Guide and Reference for more information.
Oracle8i interMedia Audio, Image, and Video Java Client describes the ORDMultiMedia object type, which is the abstract superclass for all the other objects, namely ORDAudio, ORDImage, and ORDVideo.
It also describes the BindToTableParams object type, which contains information about binding a client-side object to a database object.
The ORDMultiMedia object type contains the common attributes and methods of the ORDAudio, ORDImage, and ORDVideo object types. It is an abstract superclass of ORDAudio, ORDImage, and ORDVideo.
The object type is defined as follows:
package oracle.ord.media; import java.sql.*; import java.io.*; import oracle.jdbc.driver.*; import oracle.sql.*; public abstract class OrdMultiMedia { BindToTableParams bindParams; String mediaType; // OrdAudio, OrdVideo, OrdImage Connection connection; OrdSource source; String mimeType = ""; String format = "" ; protected OrdMultiMedia( ) { } abstract String getMediaType( ); { } abstract String getFormatStr( ) { } abstract String getUpdStr( ) { } abstract String getSourceStr( ) { } abstract String getContentLengthAPI( ) { } public abstract int getContentLength( ) throws SQLException { } protected void setConnection(Connection the_connection) { } protected Connection getConnection( ) { } public void setBindParams(String tableName, String columnName, String condition) { } String getSQLConstructor(boolean updateOption, String objName) { } String defineSQLResults(String var) { } int declareSQLResults(int start, OracleCallableStatement stmt) throws SQLException { } int getSQLResults(int start, OracleCallableStatement stmt) throws SQLException { } String setSQLParams(String var) { } int bindInSQLParams(int start, OracleCallableStatement stmt) throws SQLException { } public abstract void refresh(boolean forUpdate) throws SQLException { } void setLock(boolean lockOption) { } boolean isLocked( ) { } String getUpdateStr(String objName) { } public abstract void flush( ) throws SQLException { } String getPlSqlStmtBlockTemplate(boolean updateOption, String statement, String objName) { } public String getMimeType( ) { } public void setMimeType(String the_mimeType) { } public Timestamp getUpdateTime( ) { } public void setUpdateTime( ) throws SQLException { } public void setFormat(String the_format) { } public String getFormat( ) { } OrdSource getSourceObject( ) { } public String getSource( ) { } public void setSource(String type, String loc, String name) { } public String getSourceType( ) { } public String getSourceLocation( ) { } public String getSourceName( ) { } public void importData(byte[ ] ctx) throws SQLException { } public void importFrom(byte[ ] ctx, String type, String loc, String name) throws SQLException { } public void export(byte[ ] ctx, String type, String loc, String name) throws SQLException { } public BLOB getContent( ) throws SQLException { } public int getContentLength(byte[ ] ctx) throws SQLException { } public void deleteContent( ) throws SQLException { } public byte[ ] getData(String tableName, String columnName, String condition) throws SQLException, OutOfMemoryError { } public byte[ ] getData( ) throws SQLException, OutOfMemoryError { } public void getDataInFile(String fileName) throws SQLException, IOException { } public InputStream getDataInStream( ) throws SQLException { } public boolean loadData(String fileName, String tableName, String columnName, String condition) throws SQLException, FileNotFoundException, IOException { } public boolean loadData(String filename) throws SQLException, IOException, SecurityException { } boolean loadDataInChunks(String filename, int fileLength) throws SQLException, IOException { } public void setLocal( ) { } public void clearLocal( ) { } public boolean isLocal( ) { } public int getContentLength( ) throws SQLException { } public BFILE getBFILE( ) throws SQLException { } public void setSourceInformation(String sourceType, String sourceLocation, String sourceName) { } }
where the class attributes are defined as:
The BindToTableParams object type contains information about binding a client-side object to a database object.
Note: In the following code, the methods begin with public. This indicates that the method can be called by all classes in all packages. |
The object type is defined as follows:
package oracle.ord.media; public class BindToTableParams { String tableName; String columnName; String dataCondition; public BindToTableParams( ) { } public String getTableName( ) { } public String getColumnName( ) { } public String getDataCondition( ) { } public void setTableName(String the_tableName) { } public void setColumnName(String the_columnName) { } public void setDataCondition(String the_dataCondition) { } }
where the class attributes are defined as:
This section presents reference information on the methods contained in the ORDMultiMedia superclass. These methods are described in the following groupings:
This section presents reference information on the ORDMultiMedia methods associated with the bindParams attribute.
The methods described in this reference chapter show examples based on the instantiation of an ORDMultiMedia object. For the examples in Section 3.2.1 through Section 3.2.13, please consult the following code:
import oracle.ord.media.mediaClass; public class clientProgram { public static void main(String[ ] args){ The code in the examples appears here } }
mediaClass can add features to audio, image, or video.
public void setBindParams(String tableName, String columnName, String condition)
public
Sets the data location parameters, also known as binding parameters, which will be used to bind the client-side proxy object to the server-side object.
The client-side proxy object is bound to a server-side object that resides in an object of a relational table. This method sets the binding parameters for the proxy object with the server-side object.
The parameters must point to a unique interMedia object in the database.
The name of the table to which the object will be bound.
The name of the column in the table to which the object will be bound. The column must contain interMedia objects.
The select condition on the table, used to identify the row to which the object will be bound.
None.
None.
mediaClass mediaObject = new mediaObject(connection); . . . mediaObject.setBindParams("audioTable", "song", "songID = 3");
where:
This section presents reference information on the ORDMultiMedia methods associated with the connection attribute.
See Section 3.2.1 for additional code required to run the example code.
protected void setConnection(Connection the_connection)
protected
Sets the connection with the database.
The connection instance.
None.
None.
Do not use this method unless you are extending the package.
protected Connection getConnection( )
protected
Gets the connection with the database.
None.
This method returns the connection attribute.
None.
Do not use this method unless you are extending the package.
This section presents reference information on the ORDMultiMedia methods associated with the source attribute.
See Section 3.2.1 for additional code required to run the example code.
OrdSource getSourceObject( )
package
Gets the client-side ORDSource object.
None.
This method returns the ORDSource attribute.
None.
Do not use this method unless you are extending the package.
public void setSource(String type, String loc, String name)
public
Sets the client-side ORDMultiMedia object source information, which is of the form srcType://srcLocation/srcName.
The source type (for example, FILE or HTTP).
The source location.
The source name.
None.
None.
mediaClass mediaObject = new mediaObject(connection); . . . mediaObject.setSource("file", "ORDIMGDIR", "jdoe.gif");
where:
public String getSource( )
public
Gets the client-side ORDMultiMedia object source information, which is of the form srcType://srcLocation/srcName.
None.
This method returns the source information.
None.
mediaClass mediaObject = new mediaObject(connection); . . . String srcStr = mediaObject.getSource( );
public void setSourceInformation(String sourceType, String sourceLocation, String sourceName)
public
Sets the source-related attribute values of the client-side ORDMultiMedia object.
The type of the source.
The location of the source.
The name of the source.
None.
None.
mediaClass mediaObject = new mediaObject(connection); . . . mediaObject.setSourceInformation("file", "ORDIMGDIR", "jdoe.gif");
where:
public String getSourceType( )
public
Gets the source type information of the client-side ORDMultiMedia object.
None.
This method returns the source type information.
None.
mediaClass mediaObject = new mediaObject(connection); . . . String srcType = mediaObject.getSourceType( );
public String getSourceLocation( )
public
Gets the source location information of the client-side ORDMultiMedia object.
None.
This method returns the source location information.
None.
mediaClass mediaObject = new mediaObject(connection); . . . String str = mediaObject.getSourceLocation( );
public String getSourceName( )
public
Gets the source name information of the client-side ORDMultiMedia object.
None.
This method returns the source name information.
None.
mediaClass mediaObject = new mediaObject(connection); . . . String str = mediaObject.getSourceName( );
public void importData(byte[ ] ctx) throws SQLException
public
Imports data from the source information into the server-side ORDMultiMedia object. The source information is provided in the attributes of the server-side ORDMultiMedia object.
The source plug-in context information.
None.
java.sql.SQLException
try{ byte[ ] ctx = new byte[4000]; mediaClass mediaObject = new mediaObject(connection); . . . mediaObject.importData(ctx); } catch(SQLException e){ . . . }
where:
public void importFrom(byte[ ] ctx, String type, String loc, String name) throws SQLException
public
Imports data from the source information into the server-side ORDMultiMedia object. The source information in provided in the parameters.
The source plug-in context information.
The source type.
The source location.
The source name.
None.
java.sql.SQLException
try{ mediaClass mediaObject = new mediaObject(connection); byte[ ] ctx = new byte[4000]; . . . mediaObject.importFrom(ctx, "HTTP", "directory1", "file"); } catch(SQLException e){ . . . }
where:
public void export(byte[ ] ctx, String type, String loc, String name) throws SQLException
public
Exports the data in the server-side ORDMultiMedia object localData attribute to the target specified in the parameters.
Currently this method is not supported at the server side, so the client raises an exception.
The source plug-in context information.
The source type.
The source location.
The source name.
None.
java.sql.SQLException
try{ mediaClass mediaObject = new mediaObject(connection); byte[ ] ctx = new byte[4000]; . . . mediaObject.export(ctx, "HTTP", "directory1", "file"); } catch(SQLException e){ . . . }
where:
public BLOB getContent( ) throws SQLException
public
Copy the BLOB from the server side to the client side and return the LOB locator from the client cache.
None.
This method returns the LOB locator where the content of the multimedia object is stored.
java.sql.SQLException
try{ mediaClass mediaObject = new mediaObject(connection); . . . BLOB blob = mediaObject.getContent( ); } catch(SQLException e){ . . . }
public int getContentLength(byte[ ] ctx) throws SQLException
public
Returns the content length of the media data.
The source plug-in context information.
This method returns the length of the data content of the media object.
java.sql.SQLException
try{ mediaClass mediaObject = new mediaObject(connection); byte[ ] ctx = new byte[4000]; . . . int length = mediaObject.getContentLength(ctx); } catch(SQLException e){ . . . }
where:
public int getContentLength( ) throws SQLException
public
Gets the content length of the source localData attribute.
None.
This method returns the content length of the source data.
java.sql.SQLException
try{ mediaClass mediaObject = new mediaObject(connection); . . . int i = mediaObject.getContentLength( ); } catch(SQLException e){ . . . }
public void deleteContent( ) throws SQLException
public
Deletes the media data in the server-side ORDMultiMedia object.
None.
None.
java.sql.SQLException
try{ mediaClass mediaObject = new mediaObject(connection); . . . mediaObject.deleteContent( ); } catch(SQLException e){ . . . }
public void setLocal( )
public
Sets the client-side ORDMultiMedia object source local attribute to true, which indicates that the localData attribute is valid.
None.
None.
None.
mediaClass mediaObject = new mediaObject(connection); . . . mediaObject.setLocal( );
public void clearLocal( )
public
Sets the client-side ORDMultiMedia object source local attribute to false.
None.
None.
None.
mediaClass mediaObject = new mediaObject(connection); . . . mediaObject.clearLocal( );
public boolean isLocal( )
public
Gets the client-side ORDMultiMedia object source local attribute.
None.
This method returns the value of the source local variable.
None.
mediaClass mediaObject = new mediaObject(connection); . . . if(mediaObject.isLocal( )){ system.out.println("Source is local"); };
public BFILE getBFILE( ) throws SQLException
public
Gets the server-side ORDMultiMedia object source BFILE attribute, assuming that srcType="file".
None.
This method returns the BFILE.
java.sql.SQLException
try{ mediaClass mediaObject = new mediaObject(connection); . . . BFILE bfile = mediaObject.getBFILE( ); } catch(SQLException e){ . . . }
This section presents reference information on the ORDMultiMedia methods associated with the mimeType attribute.
See Section 3.2.1 for additional code required to run the example code.
public void setMimeType(String the_mimeType)
public
Sets the MIME type of the client-side ORDMultiMedia object.
The value of the MIME type in the client-side object cache.
None.
None.
mediaClass mediaObject = new mediaObject(connection); . . . mediaObject.setMimeType("audio/basic");
where:
public String getMimeType( )
public
Gets the MIME type of the client-side ORDMultiMedia object.
None.
This method returns the MIME type value.
None.
mediaClass mediaObject = new mediaObject(connection); . . . String mimeType = mediaObject.getMimeType( );
This section presents reference information on the ORDMultiMedia methods associated with the format attribute.
See Section 3.2.1 for additional code required to run the example code.
public void setFormat(String the_format)
public
Sets the format of the client-side ORDMultiMedia object.
The value of the format.
None.
None.
mediaClass mediaObject = new mediaObject(connection); . . . mediaObject.setFormat("AUFF");
where:
public String getFormat( )
public
Gets the format of the client-side ORDMultiMedia object.
None.
This method returns the value of the format stored in the client-side object cache.
None.
mediaClass mediaObject = new mediaObject(connection); . . . String sqlStr = mediaObject.getFormat( );
This section presents reference information on the ORDMultiMedia methods associated with the updateTime attribute.
See Section 3.2.1 for additional code required to run the example code.
public void setUpdateTime( ) throws SQLException
public
Sets the ORDMultiMedia source updateTime attribute to the current time in both the server-side and client-side ORDMultiMedia objects.
None.
None.
java.sql.SQLException
try{ mediaClass mediaObject = new mediaObject(connection); . . . mediaObject.setUpdateTime( ); } catch(SQLException e){ . . . }
public Timestamp getUpdateTime( )
public
Returns the value of the client-side ORDMultiMedia object source updateTime attribute.
None.
This method returns the source updateTime attribute.
None.
mediaClass mediaObject = new mediaObject(connection); . . . String lastUpdateTime = mediaObject.getUpdateTime( );
This section presents reference information on the ORDMultiMedia methods associated with the media type.
See Section 3.2.1 for additional code required to run the example code.
abstract String getMediaType( )
packaged
Returns the media type information.
This is a virtual method that is defined in the ORDAudio, ORDImage, and ORDVideo subclasses.
None.
This method returns the media type.
None.
Do not use this method unless you are extending the package.
This section presents reference information on the ORDVideo methods associated with the content length.
See Section 3.2.1 for additional code required to run the example code.
public abstract int getContentLength( ) throws SQLException
public
Returns the content length.
This is a virtual method that is defined in the ORDAudio and ORDVideo subclasses.
None.
This method returns the content length, in bytes.
java.sql.SQLException
See "getContentLength( ) Method" in Chapter 4; "getContentLength(byte[ ]) Method" or "getContentLength( ) Method" in Chapter 5; "getContentLength( ) Method" in Chapter 6; or "getContentLength(byte[ ]) Method" or "getContentLength( ) Method" in Chapter 7 for the usage of this method.
This section presents reference information on the ORDMultiMedia methods associated with communication between the client and server.
See Section 3.2.1 for additional code required to run the example code.
public abstract void refresh(boolean forUpdate) throws SQLException
public
Sends information from the server-side media object to the client-side media object with or without locking the database row. See Section 3.2.10 for information on locking.
This is a virtual method that is defined in the ORDAudio, ORDImage, and ORDVideo subclasses.
The indicator for whether or not the option will be refreshed for update. If the object is refreshed for update, the value is true. Otherwise, the value is false.
None.
java.sql.SQLException
See "refresh( ) Method" in Chapter 5; "refresh( ) Method" in Chapter 6; or
"refresh( ) Method" in Chapter 7 for the usage of this method.
public abstract void flush( ) throws SQLException
public
Sends information from the client-side media object to the server-side media object.
This is a virtual method that is defined in the ORDAudio, ORDImage, and ORDVideo subclasses.
None.
None.
java.sql.SQLException
See "flush( ) Method" in Chapter 5; "flush( ) Method" in Chapter 6; or
"flush( ) Method" in Chapter 7 for the usage of this method.
String getUpdateStr(String objName)
package
Returns the SQL statement to update the ORDMultiMedia object.
The object variable name.
This method returns the SQL string that will update a database instance with the value of the object instance defined in objName.
None.
Do not use this method unless you are extending the package.
This section presents reference information on the ORDMultiMedia methods associated with locking.
See Section 3.2.1 for additional code required to run the example code.
void setLock(boolean lockOption)
package
Sets the lock.
The lock value.
None.
None.
Do not use this method unless you are extending the package.
boolean isLocked( )
package
Gets the value of the lock.
None.
This method returns the value of the lock.
None.
Do not use this method unless you are extending the package.
This section presents reference information on the ORDMultiMedia methods associated with the SQL type.
See Section 3.2.1 for additional code required to run the example code.
String getSQLConstructor(boolean updateOption, String objName)
package
Gets the SQL type constructor for the ORDMultiMedia object, which can be either an ORDAudio, ORDImage, or ORDVideo object.
The indicator for whether or not the option is to be updated.
The multimedia object variable name.
This method returns the SQL string that will bind an object instance variable to a database object instance.
None.
Do not use this method unless you are extending the package.
String defineSQLResults(String var)
package
Defines the SQL results that will be used to assign values to the ORDMultiMedia object attributes.
This method is used by the refresh( ) method to assign the server-side object attribute values to the corresponding client-side object attributes.
The name of the multimedia object variable.
This method returns the String that will define the SQL results.
None.
Do not use this method unless you are extending the package.
int declareSQLResults(int start, OracleCallableStatement stmt) throws SQLException
package
Declares types for the SQL results corresponding to the different ORDMultiMedia object attributes.
This method is used by the refresh( ) method to declare the types of the client-side object attributes needed for assigning values to those attributes corresponding to the server-side object attributes.
The position in the statement where the binding begins.
The Oracle callable statement that will be executed on the server side.
This method returns an integer defined as position + 1, where position is the last index in the statement for which the type was declared.
java.sql.SQLException
Do not use this method unless you are extending the package.
int getSQLResults(int start, OracleCallableStatement stmt) throws SQLException
package
Gets the SQL results to assign to the attributes of the ORDMultiMedia object (for example, mimeType or format).
This method is used by the refresh( ) method to assign the server-side object attribute values to the corresponding client-side object attributes.
The initial position in the statement to get the results.
The Oracle callable statement that has been executed on the server side.
This method returns the position in the statement from which the next result can be fetched.
java.sql.SQLException
Do not use this method unless you are extending the package.
String setSQLParams(String var)
package
Sets the values of the SQL type of the ORDMultiMedia object as parameters.
This method is used by the flush( ) method to set the values of the different attributes of the server-side object with the client-side attributes.
The name of the multimedia object variable.
This method returns the SQL string that will set the different attributes of the ORDMultiMedia object.
None.
Do not use this method unless you are extending the package.
int bindInSQLParams(int start, OracleCallableStatement stmt) throws SQLException
package
Binds the values of the SQL type of the ORDMultiMedia object.
This method is used by the flush( ) method to set the values of the different attributes of the server-side object with the client-side attributes.
The position in the statement where the binding begins.
The Oracle callable statement which is to be executed on the server side.
This method returns an integer defined as position + 1, where position is the last index in the statement to which a value was bound.
java.sql.SQLException
Do not use this method unless you are extending the package.
String getPlSqlStmtBlockTemplate(boolean updateOption, String statement, String objName)
package
Returns a code template for executing a PL/SQL statement.
The indicator for whether or not the statement requires a lock.
The PL/SQL statement to be embedded in the code template.
The PL/SQL variable name for the multimedia object.
This method returns the SQL string that will contain the PL/SQL DECLARE... BEGIN... END statement block.
None.
Do not use this method unless you are extending the package.
This section presents reference information on the ORDVideo methods associated with generating SQL queries.
See Section 3.2.1 for additional code required to run the example code.
abstract String getFormatStr( )
package
Returns the format String, which is used by other methods to generate SQL queries.
This is a virtual method that is defined in the ORDAudio, ORDImage, and ORDVideo subclasses.
None.
This method returns the format String.
None.
Do not use this method unless you are extending the package.
abstract String getUpdStr( )
package
Returns the SQL string that is used to update an instance, which is used by other methods to generate SQL queries.
This is a virtual method that is defined in the ORDAudio, ORDImage, and ORDVideo subclasses.
None.
This method returns the SQL string that is used to update an instance.
None.
Do not use this method unless you are extending the package.
abstract String getSourceStr( )
package
Returns the source String, which is used by other methods to generate SQL queries.
This is a virtual method that is defined in the ORDAudio, ORDImage, and ORDVideo subclasses.
None.
This method returns the source String.
None.
Do not use this method unless you are extending the package.
abstract String getContentLengthAPI( )
package
Returns the server-side contentLength API for this class, which is used by other methods to generate SQL queries.
This is a virtual method that is defined in the ORDAudio, ORDImage, and ORDVideo subclasses.
None.
This method returns the server-side contentLength API for this class.
None.
Do not use this method unless you are extending the package.
This section presents reference information on the ORDMultiMedia methods associated with the media data.
See Section 3.2.1 for additional code required to run the example code.
public byte[ ] getData(String tableName, String columnName, String condition) throws SQLException, OutOfMemoryError
public
Returns the BLOB data of the server-side ORDMultiMedia object as a byte array, given the table name, the column name, and the data condition.
If the data cannot fit into the main memory at any one point in time, then this method raises an OutOfMemory error. In this case, the application program can catch the exception and call the getDataInFile( ) method, which will download the data in the BLOB into a file.
The name of the table from which to get the data.
The name of the column from which to get the data.
The selection condition to identify the row from which to get the data.
This method returns the byte array containing the BLOB data.
java.sql.SQLException
java.lang.OutOfMemoryError
try{ mediaClass mediaObject = new mediaObject(connection); . . . byte[ ] data = mediaObject.getData("audioTable", "song", "songID = 3"); } catch(SQLException e){ . . . } catch(OutOfMemoryError oum){ . . . }
where:
public byte[ ] getData( ) throws SQLException, OutOfMemoryError
public
Returns the BLOB data of the server-side ORDMultiMedia object as a byte array.
The bindParams attribute is used to locate the data in the database. It reads the length of the data content in the BLOB, reads the data in chunks of 32,300 bytes, and writes the data into a byte array. The method returns this byte array.
See "setBindParams( ) Method" for information on setting the binding parameters.
If the data cannot fit into the main memory at any one point in time, then this method raises an OutOfMemory error. In this case, the application program can call the getDataInFile( ) method, which will download the data in the BLOB into a file.
None.
This method returns the byte array containing the BLOB data.
java.sql.SQLException
java.lang.OutOfMemoryError
try{ mediaClass mediaObject = new mediaObject(connection); . . . byte[ ] data = mediaObject.getData( ); } catch(SQLException e){ . . . } catch(OutOfMemoryError oum){ . . . }
public void getDataInFile(String fileName) throws SQLException, IOException
public
Puts the server-side ORDMultiMedia object BLOB data into a file whose name is provided in the parameter.
The name of the file where the media data will be stored.
None.
java.sql.SQLException
java.io.IOException
try{ mediaClass mediaObject = new mediaObject(connection); . . . mediaObject.getDataInFile(file); } catch(SQLException e){ . . . } catch(IOException io){ . . . }
where:
public InputStream getDataInStream( ) throws SQLException
public
Returns the server-side ORDMultiMedia object media data as an InputStream object.
None.
This method returns the media data, as an InputStream object.
java.sql.SQLException
try{ mediaClass mediaObject = new mediaObject(connection); . . . InputStream mediaStream = mediaObject.getDataInFile( ); } catch(SQLException e){ . . . }
public boolean loadData(String fileName, String tableName, String columnName, String condition) throws SQLException, FileNotFoundException, IOException
public
Loads the server-side ORDMultiMedia object media data into a BLOB that is identified by the parameters tableName, columnName, and condition.
The file from which the data will be loaded.
The name of the table into which the data will be loaded.
The name of the column into which the data will be loaded.
The selection condition to identify the row into which the data will be loaded.
This method returns true if successful; false otherwise.
java.sql.SQLException
java.io.FileNotFoundException
java.io.IOException
try{ mediaClass mediaObject = new mediaObject(connection); . . . if(mediaObject.loadData("file", "audioTable", "song", "songID = 3")){ system.out.println("Loading is successful"); } } catch(SQLException e){ . . . } catch(FileNotFoundException fnf){ . . . } catch(IOException io){ . . . }
where:
public boolean loadData(String fileName) throws SQLException, IOException, SecurityException
public
Loads the server-side ORDMultiMedia object media data from a given file into a media object designated by the binding parameters.
The file from which the data will be loaded.
This method returns true if the loading is successful; false otherwise.
java.sql.SQLException
java.io.IOException
java.lang.SecurityException
try{ mediaClass mediaObject = new mediaObject(connection); . . . if(mediaObject.loadData("jdoe.gif")){ system.out.println("Loading is successful."); } } catch(SQLException e){ . . . } catch(OutOfMemoryError oum){ . . . } catch(IOException io){ . . . } catch(SecurityException s){ . . . }
where:
boolean loadDataInChunks(String fileName, int fileLength) throws SQLException, IOException
package
Loads the server-side ORDMultiMedia object media data in chunks of 32K bytes at a time from a given file into a media object that is designated by the binding parameters.
This method is called by loadData( ) if the data file to be loaded is too large to fit into the memory.
The file from which the data will be loaded.
The total length of the file, in bytes.
This method returns true if loading is successful; false otherwise.
java.sql.SQLException
java.io.IOException
Do not use this method unless you are extending the package.
This section presents reference information on the methods contained in the BindToTableParams class. These methods are described in the following groupings:
This section presents reference information on the BindToTableParams methods associated with the tableName attribute.
public void setTableName(String the_tableName)
public
Sets the table name.
The table name.
None.
None.
None.
public String getTableName( )
public
Gets the table name to which the client object is bound.
None.
This method returns the table name.
None.
None.
This section presents reference information on the BindToTableParams methods associated with the columnName attribute.
public void setColumnName(String the_columnName)
public
Sets the column name.
The column name.
None.
None.
None.
public String getColumnName( )
public
Gets the column name to which the client object is bound.
None.
This method returns the column name.
None.
None.
This section presents reference information on the BindToTableParams methods associated with the dataCondition attribute.
public void setDataCondition(String the_dataCondition)
public
Sets the data condition.
The data condition.
None.
None.
None.
public String getDataCondition( )
public
Gets the select condition of the row on the server-side object to which the client-side object is bound.
None.
This method returns the data condition.
None.
None.