Oracle8i interMedia Audio, Image, and Video Java Client User's Guide and Reference
Release 8.1.5

A67296-01

Library

Product

Contents

Index

Prev Next

7
ORDVideo and FrameDimension Reference Information

Oracle8i interMedia Audio, Image, and Video Java Client contains information about the ORDVideo:

Oracle8i interMedia Audio, Image, and Video Java Client contains information about the FrameDimension:

Methods invoked at the ORDVideo level that are handed off for processing to the server-side source plug-in or server-side format 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.


Note:

In the current release, not all source plug-ins or format plug-ins will use or generate the context parameter, but if you include the parameter as previously described, your application should work with any current or future source plug-ins or format plug-ins.  


See Oracle8i interMedia Audio, Image, and Video User's Guide and Reference for more information.

7.1 Object Types

Oracle8i interMedia Audio, Image, and Video Java Client describes the ORDVideo object type, which supports the storage and management of video data.


ORDVideo Object Type

The ORDVideo object type supports the storage and management of video data.


Note:

In the following code, some methods will begin with public. This indicates that the method can be called by all classes in all packages. The methods that are not designated as public have the default protection, which means that they can be called only by other methods in the package.  


This object type is defined as follows:

package oracle.ord.media;
import java.sql.*;
import java.io.*;
import oracle.jdbc.driver.*;
import oracle.sql.*;

public class OrdVideo extends OrdMultiMedia {

     int width;
     int height;
     int frameResolution;
     int frameRate;
     int videoDuration;
     int numberOfFrames;
     String compressionType;
     int numberOfColors;
     int bitRate;
     String description;
     CLOB comments;
     
     public OrdVideo( )
     { } 
     
     public OrdVideo(Connection the_connection) 
     { } 
     
     String getMediaType( )
     { }
     
     String getFormatStr( )
     { }
     
     String getUpdStr( )
     { }
     
     String getSourceStr( )
     { }
     
     String getContentLengthAPI( )
     { }
     
     public int getContentLength( )
     throws SQLException
     { }
     
     String getSQLConstructor(boolean updateOption, String objName)
     { }
     
     String defineSQLResults(String var)
     { }
     
     int declareSQLResults(int start, OracleCallableStatement stmt)
     throws SQLException
     { }
     
     String setSQLParams(String var)
     { }
     
     int bindInSQLParams(int start, OracleCallableStatement stmt)
     throws SQLException
     { }
     
     int getSQLResults(int start, OracleCallableStatement stmt)
     throws SQLException
     { }
     
     public void refresh(boolean forUpdate)
     throws SQLException
     { }
     
     public void flush( )
     throws SQLException
     { }
     
     public void setWidth(int the_width)
     { }
     
     public void setHeight(int the_height)
     { }
     
     public void setFrameResolution(int the_frameResolution)
     { }
     
     public void setFrameRate(int the_frameRate)
     { }
     
     public void setNumberOfFrames(int the_numberOfFrames)
     { }
     
     public void setVideoDuration(int the_videoDuration)
     { }
     
     public void setCompressionType(String the_compressionType)
     { }
     
     public void setNumberOfColors(int the_numberOfColors)
     { }
     
     public void setBitRate(int the_bitRate)
     { }
     
     public void setKnownAttributes(String knownFormat, int knownWidth,
          int knownHeight, int knownFrameResolution, int knownFrameRate,
          int knownVideoDuration, int knownNumberOfFrames,
          String knownCompressionType, int knownNumberOfColors,
          int knownBitRate)
     { }
     
     public String getFormat(byte[ ] ctx)
     throws SQLException
     { }
     
     public FrameDimension getFrameSize(byte[ ] ctx)
     throws SQLException
     { }
     
     public int getWidth( )
     { }
     
     public int getHeight( )
     { }
     
     public int getFrameResolution(byte[ ] ctx)
     throws SQLException
     { }
     
     public int getFrameResolution( )
     { }
     
     public int getFrameRate(byte[ ] ctx)
     throws SQLException
     { }
     
     public int getFrameRate( )
     { }
     
     public int getNumberOfFrames(byte[ ] ctx)
     throws SQLException
     { }
     
     public int getNumberOfFrames( )
     { }
     
     public int getVideoDuration(byte[ ] ctx)
     throws SQLException
     { }
     
     public int getVideoDuration( )
     { }
     
     public String getCompressionType(byte[ ] ctx)
     throws SQLException
     { }
     
     public String getCompressionType( )
     { }
     
     public int getNumberOfColors(byte[ ] ctx)
     throws SQLException
     { }
     
     public int getNumberOfColors( )
     { }
     
     public int getBitRate(byte[ ] ctx)
     throws SQLException
     { }
     
     public int getBitRate( )
     { }
     
     public void setDescription(String the_description)
     throws SQLException
     { }
     
     public String getDescription( )
     throws SQLException
     { }
     
     public int getContentLength(byte[ ] ctx)
     throws SQLException
     { }
     
     public void setProperties(byte[ ] ctx)
     throws SQLException
     { }
     
     public boolean checkProperties(byte[ ] ctx)
     throws SQLException
     { }
     
     public void appendToComments(int amount, String buffer)
     throws SQLException
     { }
     
     public void writeToComments(int offset, int amount, String buffer)
     throws SQLException
     { }
     
     public String readFromComments(int offset, int amount)
     throws SQLException
     { }
     
     public int locateInComment(String pattern, int offset, int occurrence)
     throws SQLException
     { }
     
     public void trimComments(int newlen)
     throws SQLException
     { }
     
     public int eraseFromComments(int amount, int offset)
     throws SQLException
     { }
     
     public void deleteComments( )
     throws SQLException
     { }
     
     public CLOB copyCommentsOut(CLOB dest, int amount, int from_loc,
          int to_loc)
     throws SQLException
     { }
     
     public int compareComments(CLOB dest, int amount, int start_in_comment,
          int start_in_compare_comment)
     throws SQLException
     { }
     
     public void loadCommentsFromFile(String loc, String fileName,
          int amount, int from_loc, int to_loc)
     throws SQLException
     { }
     
     public int getCommentLength( )
     throws SQLException
     { }
     
     public String getAttribute(byte[ ] ctx, String name)
     throws SQLException
     { }
     
     public CLOB getAllAttributes(byte[ ] ctx)
     throws SQLException
     { }
     
     public String getAllAttributesAsString(byte[ ] ctx) 
     throws SQLException
     { }
     
     public BLOB getContentInLob(byte[ ] ctx, StringBuffer mimeType,
          StringBuffer format)
     throws SQLException
     { }
     
     public int openSource (byte[ ] userArg, byte[ ] ctx)
     throws SQLException
     { }
     
     public int closeSource (byte[ ] ctx)
     throws SQLException
     { }
     
     public int trimSource (byte[ ] ctx, int newLen)
     throws SQLException
     { }
     
     public int readFromSource(byte[ ] ctx, int startPos, int numBytes,
          byte[ ] buffer)
     throws SQLException
     { }
     
     public int writeToSource(byte[ ] ctx, int startPos, int numBytes,
          byte[ ] buffer)
     throws SQLException
     { }
     
     public byte[ ] processSourceCommand(byte[ ] ctx, String cmd, String args,
          byte[ ] result)
     throws SQLException
     { }
     
     public byte[ ] processVideoCommand(byte[ ] ctx, String cmd, String args,
          byte[ ] result)
     throws SQLException
     { }
     
     public CLOB getComments( )
     throws SQLException
     { }
     
     public void setComments(CLOB the_comments)
     throws SQLException
     { }
     public String getCommentsAsString( )
     throws SQLException, OutOfMemoryError
     { }
     
     public boolean loadComments(String filename)
     throws SQLException, IOException, SecurityException
     { }
     
     boolean loadCommentsInChunks(String fileName, int fileLength)
     throws SQLException, IOException
     { }
}

where the class attributes are defined as:


FrameDimension Object Type

The FrameDimension object type defines the FrameDimension object, which is used to store video width and height information.


Note:

In the following code, the methods begin with public. This indicates that the method can be called by all classes in all packages.  


This object type is defined as follows:

package oracle.ord.media;

public class FrameDimension {
     int width;
     int height;
     
     /**
      * Constructor
      */
     
     public FrameDimension( )
     { }
     
     public int getWidth( )
     { }
     
     public int getHeight( )
     { }
     
     public void setWidth(int the_width)
     { }
     
     public void setHeight(int the_height)
     { }
     
}

where the class attributes are defined as:

7.2 ORDVideo Methods

This section presents ORDVideo reference information on the methods used for video data manipulation. These methods are described in the following groupings:

ORDVideo Methods Associated with Video Attribute Accessors

ORDVideo Methods Associated with the description Attribute

ORDVideo Methods Associated with the comments Attribute

ORDVideo Methods Associated with Communication Between the Client and Server

ORDVideo Methods Associated with the Media Type

ORDVideo Methods Associated with the Content Length

ORDVideo Methods Associated with the SQL Type

ORDVideo Methods Associated with Generating SQL Queries

ORDVideo Methods Associated with File Operations

ORDVideo Methods Associated with Source Content Operations

ORDVideo Methods Associated with Processing Commands to the External Source

7.2.1 ORDVideo Methods Associated with Video Attribute Accessors

This section presents reference information on the ORDVideo methods associated with video attribute accessors.

The methods described in this reference chapter show examples based on the instantiation of an ORDVideo object. For the examples in Section 7.2.1 through Section 7.2.11, please consult the following Java code:

import oracle.ord.media.*;

public class clientProgram {
     public static void main(String[ ] args){
          The code in the examples appears here
     }
}

In each example, the parameter connection is a connection to the Oracle database.


setWidth( ) Method

Format

public void setWidth(int the_width)

Scope

public

Description

Sets the width of the client-side ORDVideo object.

Parameter

the_width

The width value to be set.

Returns

None.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
videoObj.setWidth(300);

where:


setHeight( ) Method

Format

public void setHeight(int the_height)

Scope

public

Description

Sets the height of the client-side ORDVideo object.

Parameter

the_height

The height value to be set.

Returns

None.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
videoObj.setHeight(300);

where:


getFrameSize( ) Method

Format

public FrameDimension getFrameSize(byte[ ] ctx)
throws SQLException

Scope

public

Description

Gets the frame width and height of the server-side ORDVideo object.

This method calls the server-side method getFrameSize(ctx RAW), which extracts the frame width and height information from the BLOB data.

Parameter

ctx

The format plug-in context information.

Returns

This method returns the frame size. For more information on the FrameDimension class, see "FrameDimension Object Type" and Section 7.3.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     Frame Dimension frameSpecs = videoObj.getFrameSize(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


getWidth( ) Method

Format

public int getWidth( )

Scope

public

Description

Gets the width of the client-side ORDVideo object from the client cache.

Parameter

None.

Returns

This method returns the width value from the object attribute in the client cache.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
int i = videoObj.getWidth( );

getHeight( ) Method

Format

public int getHeight( )

Scope

public

Description

Gets the height of the client-side ORDVideo object from the client cache.

Parameter

None.

Returns

This method returns the height value from the object attribute in the client cache.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
int i = videoObj.getHeight( );

setFrameResolution( ) Method

Format

public void setFrameResolution(int the_frameResolution)

Scope

public

Description

Sets the frame resolution of the client-side ORDVideo object.

Parameter

the_frameResolution

The frame resolution value to be set.

Returns

None.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
videoObj.setFrameResolution(4);

where:


getFrameResolution(byte[ ]) Method

Format

public int getFrameResolution(byte[ ] ctx)
throws SQLException

Scope

public

Description

Gets the frame resolution of the server-side ORDVideo object.

This method calls the server-side method getFrameResolution(ctx RAW), which extracts the frame resolution from the BLOB data.

Parameter

ctx

The format plug-in context information.

Returns

This method returns the frame resolution.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     int i = videoObj.getFrameResolution(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


getFrameResolution( ) Method

Format

public int getFrameResolution( )

Scope

public

Description

Gets the frame resolution of the client-side ORDVideo object from the client cache.

Parameter

None.

Returns

This method returns the frame resolution from the client cache.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
int i = videoObj.getFrameResolution( );

setFrameRate( ) Method

Format

public void setFrameRate(int the_frameRate)

Scope

public

Description

Sets the frame rate of the client-side ORDVideo object.

Parameter

the_frameRate

The frame rate value to be set.

Returns

None.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
videoObj.setFrameRate(5);

where:


getFrameRate(byte[ ]) Method

Format

public int getFrameRate(byte[ ] ctx)
throws SQLException

Scope

public

Description

Gets the frame rate of the server-side ORDVideo object.

This method calls the server-side method getFrameRate(ctx RAW), which extracts the frame rate from the BLOB data.

Parameter

ctx

The format plug-in context information.

Returns

This method returns the frame rate.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     int i = videoObj.getFrameRate(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


getFrameRate( ) Method

Format

public int getFrameRate( )

Scope

public

Description

Gets the frame rate of the client-side ORDVideo object from the client cache.

Parameter

None.

Returns

This method returns the frame rate from the client cache.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
int i = videoObj.getFrameRate( );

setVideoDuration( ) Method

Format

public void setVideoDuration(int the_videoDuration)

Scope

public

Description

Sets the video duration of the client-side ORDVideo object.

Parameter

the_videoDuration

The value of the video duration to be set.

Returns

None.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
videoObj.setVideoDuration(500);

where:


getVideoDuration(byte[ ]) Method

Format

public int getVideoDuration(byte[ ] ctx)
throws SQLException

Scope

public

Description

Gets the video duration of the server-side ORDVideo object.

This method calls the server-side method getVideoDuration(ctx RAW), which extracts the video duration from the BLOB data.

Parameter

ctx

The format plug-in context information.

Returns

This method returns the video duration.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     int i = videoObj.getVideoDuration(ctx);
}
catch (SQLException e){
     .
     .
     .
}

where:


getVideoDuration( ) Method

Format

public int getVideoDuration

Scope

public

Description

Gets the video duration of the client-side ORDVideo object from the client cache.

Parameter

None.

Returns

This method returns the video duration from the client cache.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
int i = videoObj.getVideoDuration( );

setNumberOfFrames( ) Method

Format

public void setNumberOfFrames(int the_numberOfFrames)

Scope

public

Description

Sets the number of frames in the client-side ORDVideo object.

Parameter

the_numberOfFrames

The value of the number of frames to be set.

Returns

None.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
videoObj.setNumberOfFrames(2000);

where:


getNumberOfFrames(byte[ ]) Method

Format

public int getNumberOfFrames(byte[ ] ctx)
throws SQLException

Scope

public

Description

Gets the number of frames in the server-side ORDVideo object.

This method calls the server-side method getNumberOfFrames(ctx RAW), which extracts the number of frames from the BLOB data.

Parameter

ctx

The format plug-in context information.

Returns

This method returns the number of frames.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     int i = videoObj.getNumberOfFrames(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


getNumberOfFrames( ) Method

Format

public int getNumberOfFrames( )

Scope

public

Description

Gets the number of frames in the client-side ORDVideo object from the client cache.

Parameter

None.

Returns

This method returns the number of frames from the client cache.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
int i = videoObj.getNumberOfFrames( );

setCompressionType( ) Method

Format

public void setCompressionType(String the_compresionType)

Scope

public

Description

Sets the compression type of the client-side ORDVideo object.

Parameter

the_compressionType

The compression type value to be set.

Returns

None.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
videoObj.setCompressionType("Cinepak");

where:


getCompressionType(byte[ ]) Method

Format

public String getCompressionType(byte[ ] ctx)
throws SQLException

Scope

public

Description

Gets the compression type of the server-side ORDVideo object.

This method calls the server-side method getCompressionType(ctx RAW), which extracts the compression type from the BLOB data.

Parameter

ctx

The format plug-in context information.

Returns

This method returns the compression type.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     String compType = videoObj.getCompressionType(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


getCompressionType( ) Method

Format

public String getCompressionType( )

Scope

public

Description

Gets the compression type of the client-side ORDVideo object from the client cache.

Parameter

None.

Returns

This method returns the compression type from the client cache.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
String compType = videoObj.getCompressionType( );

setNumberOfColors( ) Method

Format

public void setNumberOfColors(int the_numberOfColors)

Scope

public

Description

Sets the number of colors in the client-side ORDVideo object.

Parameter

the_numberOfColors

The value of the number of colors to be set.

Returns

None.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
videoObj.setNumberOfColors(4);

where:


getNumberOfColors(byte[ ]) Method

Format

public int getNumberOfColors(byte[ ] ctx)
throws SQLException

Scope

public

Description

Gets the number of colors in the server-side ORDVideo object.

This method calls the server-side method getNumberOfColors(ctx RAW), which extracts the number of colors from the BLOB data.

Parameter

ctx

The format plug-in context information.

Returns

This method returns the number of colors.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     int i = videoObj.getNumberOfColors(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


getNumberOfColors( ) Method

Format

public int getNumberOfColors( )

Scope

public

Description

Gets the number of colors in the client-side ORDVideo object from the client cache.

Parameter

None.

Returns

This method returns the number of colors from the client cache.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
int i = videoObj.getNumberOfColors( );

setBitRate( ) Method

Format

public void setBitRate(int the_bitRate)

Scope

public

Description

Sets the bit rate in the client-side ORDVideo object.

Parameter

the_bitRate

The bit rate value to be set.

Returns

None.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
videoObj.setBitRate(1500);

where:


getBitRate(byte[ ]) Method

Format

public int getBitRate(byte[ ] ctx)
throws SQLException

Scope

public

Description

Gets the bit rate in the server-side ORDVideo object.

This method calls the server-side method getBitRate(ctx RAW), which extracts the bit rate from the BLOB data.

Parameter

ctx

The format plug-in context information.

Returns

This method returns the bit rate.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     int i = videoObj.getBitRate(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


getBitRate( ) Method

Format

public int getBitRate( )

Scope

public

Description

Gets the bit rate in the client-side ORDVideo object from the client cache.

Parameter

None.

Returns

This method returns the bit rate from the client cache.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo(connection);
.
.
.
int i = videoObj.getBitRate( );

getFormat( ) Method

Format

public String getFormat(byte[ ] ctx)
throws SQLException

Scope

public

Description

Gets the format of the server-side ORDVideo object.

This method calls the server-side method getFormat(ctx RAW), which extracts the format from the BLOB data.

Parameter

ctx

The format plug-in context information.

Returns

This method returns the format.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     String vidStr = videoObj.getFormat(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


setProperties( ) Method

Format

public void setProperties(byte[ ] ctx)
throws SQLException

Scope

public

Description

Sets the properties of the specified video data in both the server-side and client-side ORDVideo objects.

The video attributes to be set include the following: format, frame size, frame resolution, frame rate, video duration, number of frames, compression type, number of colors, and bit rate.

Parameter

ctx

The format plug-in context information.

Returns

None.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     videoObj.setProperties(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


checkProperties( ) Method

Format

public boolean checkProperties(byte[ ] ctx)
throws SQLException

Scope

public

Description

Checks that the properties stored in the server-side ORDVideo object are consistent with the properties stored in the server-side raw media data.

Parameter

ctx

The format plug-in context information.

Returns

This method returns true if the properties stored in the object cache are the same as the properties stored in the BLOB data; false otherwise.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     if(videoObj.checkProperties(ctx)){
          system.out.println("Properties are consistent.");
     }
}
catch(SQLException e){
     .
     .
     .
}

where:


setKnownAttributes( ) Method

Format

public void setKnownAttributes(String knownFormat, int knownWidth,
                               int knownHeight, int knownFrameResolution,
                               int knownFrameRate, int knownVideoDuration,
                               int knownNumberOfFrames,
                               String knownCompressionType,
                               int knownNumberOfColors, int knownBitRate)

Scope

public

Description

Sets the known attributes of the client-side ORDVideo object in the client cache.

Parameters

knownFormat

The video data format.

knownWidth

The width of the frame.

knownHeight

The height of the frame.

knownFrameResolution

The frame resolution.

knownFrameRate

The frame rate.

knownVideoDuration

The video duration.

knownNumberOfFrames

The number of frames.

knownCompressionType

The compression type.

knownNumberOfColors

The number of colors.

knownBitRate

The bit rate.

Returns

None.

Exceptions

None.

Usage

OrdVideo videoObj = new OrdVideo( );
videoObj.setKnownAttributes("MOOV", 1, 2, 4, 5, 500, 1000, "Cinepak", 256, 
1500);

where:


getAttribute( ) Method

Format

public String getAttribute(byte[ ] ctx, String name)
throws SQLException

Scope

public

Description

Gets an attribute value of the server-side ORDVideo object.

Parameters

ctx

The format plug-in context information.

name

The name of the attribute.

Returns

This method returns the attribute value.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     String vidStr = videoObj.getAttribute(ctx, "encoding");
}
catch(SQLException e){
     .
     .
     .
}

where:


getAllAttributes( ) Method

Format

public CLOB getAllAttributes(byte[ ] ctx)
throws SQLException

Scope

public

Description

Gets the values of all the attributes of the server-side ORDVideo object and returns them as a CLOB.

Parameter

ctx

The format plug-in context information.

Returns

This method returns all the attribute values as a CLOB.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     CLOB clob = videoObj.getAllAttributes(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


getAllAttributesAsString( ) Method

Format

public String getAllAttributesAsString(byte[ ] ctx)
throws SQLException

Scope

public

Description

Gets the values of all the attributes of the server-side ORDVideo object and returns them as a String.

Parameter

ctx

The format plug-in context information.

Returns

This method returns all the attribute values, as a String.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     String vidStr = videoObj.getAllAttributesAsString(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:

7.2.2 ORDVideo Methods Associated with the description Attribute

This section presents reference information on the ORDVideo methods associated with the description attribute.

See Section 7.2.1 for additional code required to run the example code.


setDescription( ) Method

Format

public void setDescription(String the_description)
throws SQLException

Scope

public

Description

Sets the description attribute of the client-side ORDVideo object in the client cache.

Parameter

the_description

The description.

Returns

None.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     videoObj.setDescription("video1");
}
catch(SQLException e){
     .
     .
     .
}

where:


getDescription( ) Method

Format

public String getDescription( )
throws SQLException

Scope

public

Description

Gets the description attribute with extension of the client-side ORDVideo object from the client cache.

Parameter

None.

Returns

This method returns the description.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     String desc = videoObj.getDescription( );
}
catch(SQLException e){
     .
     .
     .
}

7.2.3 ORDVideo Methods Associated with the comments Attribute

This section presents reference information on the ORDVideo methods associated with the comments attribute.

See Section 7.2.1 for additional code required to run the example code.


setComments( ) Method

Format

public void setComments(CLOB the_comments)
throws SQLException

Scope

public

Description

Sets the comments attribute in the client cache and on the server side with a CLOB.

Parameter

the_comments

The comments to be set.

Returns

None.

Exceptions

java.sql.SQLException.

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     OrdVideo videoObj2 = new OrdVideo(connection);
     .
     .
     .
     videoObj.setComments(videoObj2.comments);
}
catch(SQLException e){
     .
     .
     .
}

where:


getComments( ) Method

Format

public CLOB getComments( )
throws SQLException

Scope

public

Description

Copies the CLOB locator from the server-side ORDVideo object to the client-side ORDVideo object and returns the LOB locator from the client cache.

Parameter

None.

Returns

This method returns the comments attribute from the client cache.

Exceptions

java.sql.SQLException.

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     CLOB clob = videoObj.getComments( );
}
     catch(SQLException e){
     .
     .
     .
}

getCommentsAsString( ) Method

Format

public String getCommentsAsString( )
throws SQLException, OutOfMemoryError

Scope

public

Description

Returns the server-side ORDVideo object comments as a String.

Parameter

None.

Returns

This method returns the comments attribute as a String.

Exceptions

java.sql.SQLException

java.lang.OutOfMemoryError

Usage

try{
     OrdAudio audioObj = new OrdAudio(connection);
     .
     .
     .
     String comments = audioObj.getCommentsAsString( );
}
catch(SQLException e){
     .
     .
     .
}

appendToComments( ) Method

Format

public void appendToComments(int amount, String buffer)
throws SQLException

Scope

public

Description

Appends data to the server-side ORDVideo object comments attribute.

Parameters

amount

The amount of data to be appended, in bytes.

buffer

The content to be appended from the buffer.

Returns

None.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     videoObj.appendToComments(5, "Drama");
}
catch(SQLException e){
     .
     .
     .
}

where:


writeToComments( ) Method

Format

public void writeToComments(int offset, int amount, String buffer)
throws SQLException

Scope

public

Description

Writes data to the server-side ORDVideo object comments attribute.

Parameters

offset

The offset from the beginning from which the method will start writing.

amount

The amount of data to be written, in bytes.

buffer

The content to be written from the buffer.

Returns

None.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     videoObj.writeToComments(0, 5, "Drama");
}
catch(SQLException e){
     .
     .
     .
}

where:


readFromComments( ) Method

Format

public String readFromComments(int offset, int amount)
throws SQLException

Scope

public

Description

Reads data from the server-side ORDVideo object comments attribute.

Parameters

offset

The offset from the beginning from which the method will start reading.

amount

The amount of data to be read, in bytes.

Returns

This method returns the String that is read.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     String videoStr = videoObj.readFromComments(0, 5);
}
catch(SQLException e){
     .
     .
     .
}

where:


locateInComment( ) Method

Format

public int locateInComment(String pattern, int offset, int occurrence)
throws SQLException

Scope

public

Description

Locates a pattern in the server-side ORDVideo object that starts from a certain offset and appears a certain number of times in the comments attribute.

Parameters

pattern

The pattern to be matched.

offset

The offset from the beginning from which the method will start searching.

occurrence

The number of times that the pattern should appear in the comments.

Returns

This method returns true if the pattern occurs in the comments for the specified number of times; false otherwise.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     int i = videoObj.locateInComment("Drama", 0, 10);
}
catch(SQLException e){
     .
     .
     .
}

where:


trimComments( ) Method

Format

public void trimComments(int newlen)
throws SQLException

Scope

public

Description

Trims the server-side ORDVideo object comments to a given length.

Parameter

newlen

The new length of the comments.

Returns

None.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     videoObj.trimComments(100);
}
catch(SQLException e){
     .
     .
     .
}

where:


eraseFromComments( ) Method

Format

public int eraseFromComments(int amount, int offset)
throws SQLException

Scope

public

Description

Erases a given amount of data from the server-side ORDVideo object comments starting from a given position.

Parameters

amount

The amount to be erased, in bytes.

offset

The offset from the beginning from which the method will start erasing.

Returns

The amount of data erased, in bytes.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     videoObj.eraseFromComments(100, 0);
}
catch(SQLException e){
     .
     .
     .
}

where:


deleteComments( ) Method

Format

public void deleteComments( )
throws SQLException

Scope

public

Description

Deletes the server-side ORDVideo object comments.

Parameter

None.

Returns

None.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     videoObj.deleteComments( );
}
catch(SQLException e){
     .
     .
     .
}

copyCommentsOut( ) Method

Format

public CLOB copyCommentsOut(CLOB dest, int amount, int from_loc,
                            int to_loc)
throws SQLException

Scope

public

Description

Copies the comments out from a server-side location to a separate location.

Parameters

dest

The new location to which the data will be copied.

amount

The amount to be copied, in bytes.

from_loc

The position where the copying will begin.

to_loc

The position where the copying will end.

Returns

This method returns the CLOB into which the comments are copied.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     OrdVideo videoObj2 = new OrdVideo(connection);
     .
     .
     .
     CLOB clob = videoObj.copyCommentsOut(videoObj2.comments, 100, 0, 99);
}
catch(SQLException e){
     .
     .
     .
}

where:


compareComments( ) Method

Format

public int compareComments(CLOB dest, int amount, int start_in_comment,
                           int start_in_compare_comment)
throws SQLException

Scope

public

Description

Compares the comments of a server-side ORDVideo object with the comments of a separate CLOB.

Parameters

dest

The location of the comments data that will be compared with the comments data of the current object.

amount

The amount of data to be compared, in bytes.

start_in_comment

The starting position in the current object.

start_in_compare_comment

The starting position in the destination object.

Returns

This method returns 1 if there is a positive match; -1 otherwise.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     OrdVideo videoObj2 = new OrdVideo(connection);
     .
     .
     .
     int i = videoObj.compareComments(videoObj2.comments, 100, 0, 50);
}
catch(SQLException e){
     .
     .
     .
}

where:


loadCommentsFromFile( ) Method

Format

public void loadCommentsFromFile(String loc, String fileName,
                                 int amount, int from_loc, int to_loc)
throws SQLException

Scope

public

Description

Loads a given amount of comments data from the server-side ORDVideo object from a separate server-side file.

Parameters

loc

The location of the file from which the comments will be loaded.

fileName

The name of the file from which the comments will be loaded.

amount

The amount of comments data to be loaded, in bytes.

from_loc

The start location in the comments attribute into which the comments will be loaded.

to_loc

The end location in the comments attribute into which the comments will be loaded.

Returns

None.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     videoObj.loadCommentsFromFile("videodir", "jdoe.mov", 100, 0, 99);
}
catch(SQLException e){
     .
     .
     .
}

where:


loadComments( ) Method

Format

public boolean loadComments(String fileName)
throws SQLException, IOException, SecurityException

Scope

public

Description

Loads comments to the server-side ORDVideo object from a client-side file.

Parameter

fileName

The name of the file from which the comments will be loaded.

Returns

This method returns true upon successful loading; false otherwise.

Exceptions

java.sql.SQLException

java.io.IOException

java.lang.SecurityException

Usage

try{
     OrdAudio audioObj = new OrdAudio(connection);
     .
     .
     .
     audioObj.loadCommentsFromFile(my_file);
}
catch(SQLException e){
     .
     .
     .
}
catch(IOException io){
     .
     .
     .
}
catch(SecurityException s){
     .
     .
     .
}

where:


loadCommentsInChunks( ) Method

Format

boolean loadCommentsInChunks(String fileName, int fileLength)
throws SQLException, IOException

Scope

package

Description

Loads comments to the server-side ORDVideo object from a client-side file in chunks of 32K bytes.

Parameters

fileName

The name of the file from which the comments will be loaded.

fileLength

The total length of the file, in bytes.

Returns

This method returns true upon successful loading; false otherwise.

Exceptions

java.sql.SQLException

java.io.IOException

Usage

Do not use this method unless you are extending the package.


getCommentLength( ) Method

Format

public int getCommentLength( )
throws SQLException

Scope

public

Description

Gets the length of the server-side ORDVideo object comments attribute.

Parameter

None.

Returns

This method returns the length of the comments attribute.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     int i = videoObj.getCommentLength( );
}
catch(SQLException e){
     .
     .
     .
}

7.2.4 ORDVideo Methods Associated with Communication Between the Client and Server

This section presents reference information on the ORDVideo methods associated with communication between the client and server.

See Section 7.2.1 for additional code required to run the example code.


refresh( ) Method

Format

public void refresh(boolean forUpdate)
throws SQLException

Scope

public

Description

Copies the server-side ORDVideo object attribute values to the client-side ORDVideo object with or without locking the database row.

Parameter

forUpdate

The indicator for whether or not the object will be refreshed for update.

Returns

None.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     videoObj.refresh(false);
}
catch(SQLException e){
     .
     .
     .
}

where


flush( ) Method

Format

public void flush( )
throws SQLException

Scope

public

Description

Copies the client-side ORDVideo object attribute values to the server-side ORDVideo object.

Parameter

None.

Returns

None.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     videoObj.flush( );
}
catch(SQLException e){
     .
     .
     .
}

7.2.5 ORDVideo Methods Associated with the Media Type

This section presents reference information on the ORDVideo methods associated with the media type.

See Section 7.2.1 for additional code required to run the example code.


getMediaType( ) Method

Format

String getMediaType( )

Scope

package

Description

Returns the media type information.

Parameter

None.

Returns

This method returns the media type, which is OrdVideo.

Exceptions

None.

Usage

Do not use this method unless you are extending the package.

7.2.6 ORDVideo Methods Associated with the Content Length

This section presents reference information on the ORDVideo methods associated with the content length.

See Section 7.2.1 for additional code required to run the example code.


getContentLength(byte[ ]) Method

Format

public int getContentLength(byte[ ] ctx)
throws SQLException

Scope

public

Description

Returns the content length of the server-side ORDVideo object media data.

Parameter

ctx

The source plug-in context information.

Returns

This method returns the length of the data content of the media data, in bytes.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     int i = videoObj.getContentLength(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where


getContentLength( ) Method

Format

public int getContentLength( )
throws SQLException

Scope

public

Description

Returns the content length of the server-side ORDVideo object media data.

Parameter

None.

Returns

This method returns the content length, in bytes.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     int i = videoObj.getContentLength( );
}
catch{
     .
     .
     .
}

7.2.7 ORDVideo Methods Associated with the SQL Type

This section presents reference information on the ORDVideo methods associated with the SQL type.

See Section 7.2.1 for additional code required to run the example code.


getSQLConstructor( ) Method

Format

String getSQLConstructor(boolean updateOption, String objName)

Scope

package

Description

Gets the SQL type constructor for the ORDVideo object.

This method calls the corresponding getSQLConstructor( ) method in the superclass.

Parameters

updateOption

The indicator for whether or not the option is flagged to be updated.

objName

The variable name of the video object.

Returns

This method returns the SQL string that will bind an object instance variable to a database object instance.

Exceptions

None.

Usage

Do not use this method unless you are extending the package.


defineSQLResults( ) Method

Format

String defineSQLResults(String var)

Scope

package

Description

Defines the SQL results that will be used to assign values to the ORDVideo 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.

Parameter

var

The name of the video object variable.

Returns

This method returns the SQL string that will define the SQL results.

Exceptions

None.

Usage

Do not use this method unless you are extending the package.


declareSQLResults( ) Method

Format

int declareSQLResults(int start, OracleCallableStatement stmt)
throws SQLException

Scope

package

Description

Declares types for the SQL results corresponding to the different ORDVideo object attributes.

This method is used by the refresh( ) method to declare the types of the client-side object attributes needed to assign values to the corresponding server-side object attributes.

Parameters

start

The position in the statement where the binding begins.

stmt

The Oracle callable statement that will be executed on the server side.

Returns

This method returns an integer defined as position + 1, where position is the last index in the statement for which the type was declared.

Exceptions

java.sql.SQLException

Usage

Do not use this method unless you are extending the package.


setSQLParams( ) Method

Format

String setSQLParams(String var)

Scope

package

Description

Sets the values of the SQL type of the ORDVideo object as parameters.

This method is used by the flush( ) method to set the values of the different attributes of the server-side object to the same values as the attributes of the corresponding client-side object.

Parameter

var

The name of the video object variable.

Returns

This method returns the SQL string that will set the different attributes of the video object.

Exceptions

None.

Usage

Do not use this method unless you are extending the package.


bindInSQLParams( ) Method

Format

int bindInSQLParams(int start, OracleCallableStatement stmt)
throws SQLException

Scope

package

Description

Binds the values of the SQL type of the ORDVideo object.

This method is used by the flush( ) method to set the values of the different attributes of the server-side object to the values of the corresponding client-side object attributes.

Parameters

start

The position in the statement where the binding begins.

stmt

The Oracle callable statement that will be executed on the server side.

Returns

This method returns an integer defined as position + 1, where position is the last index in the statement to which a value was bound.

Exceptions

java.sql.SQLException

Usage

Do not use this method unless you are extending the package.


getSQLResults( ) Method

Format

int getSQLResults(int start, OracleCallableStatement stmt)
throws SQLException

Scope

package

Description

Gets the SQL results in order to assign them to the attributes of the OrdMultiMedia object (for example, encoding or numberOfChannels).

This method is used by the refresh( ) method to assign the server-side object attribute values to the corresponding client-side object attributes.

Parameters

start

The initial position for getting results from the statement.

stmt

The Oracle callable statement that has been executed on the server side.

Returns

This method returns an integer defined as position + 1, where position is the last index in the statement to which a value was bound.

Exceptions

java.sql.SQLException

Usage

Do not use this method unless you are extending the package.

7.2.8 ORDVideo Methods Associated with Generating SQL Queries

This section presents reference information on the ORDVideo methods associated with generating SQL queries.

See Section 7.2.1 for additional code required to run the example code.


getFormatStr( ) Method

Format

String getFormatStr( )

Scope

package

Description

Returns the format String, which is used by other methods to generate SQL queries.

Parameter

None.

Returns

This method returns the format String.

Exceptions

None.

Usage

Do not use this method unless you are extending the package.


getUpdStr( ) Method

Format

String getUpdStr( )

Scope

package

Description

Returns the SQL string that is used to update an ORDVideo instance, which is used by other methods to generate SQL queries.

Parameter

None.

Returns

This method returns the SQL string that is used to update an ORDVideo instance.

Exceptions

None.

Usage

Do not use this method unless you are extending the package.


getSourceStr( ) Method

Format

String getSourceStr( )

Scope

package

Description

Returns the source String, which is used by other methods to generate SQL queries.

Parameter

None.

Returns

This method returns the source String.

Exceptions

None.

Usage

Do not use this method unless you are extending the package.


getContentLengthAPI( ) Method

Format

String getContentLengthAPI( )

Scope

package

Description

Returns the server-side contentLength API for this class, which is used by other methods to generate SQL queries.

Parameter

None.

Returns

This method returns the server-side contentLength API for this class.

Exceptions

None.

Usage

Do not use this method unless you are extending the package.

7.2.9 ORDVideo Methods Associated with File Operations

This section presents reference information on the ORDVideo methods associated with file operations.

See Section 7.2.1 for additional code required to run the example code.


openSource( ) Method

Format

public int openSource(byte[ ] userArg, byte[ ] ctx)
throws SQLException

Scope

public

Description

Opens the server-side ORDVideo object file source.

Parameters

userArg

Permission-related parameters that are supplied by the user, such as READONLY.

ctx

The source plug-in context information.

Returns

This method returns 0 in case of success or an integer greater than 0 in case of failure.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     .
     .
     .
     int i = videoObj.openSource(READONLY, ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


closeSource( ) Method

Format

public int closeSource(byte[ ] ctx)
throws SQLException

Scope

public

Description

Closes the server-side ORDVideo object file source.

Parameter

ctx

The source plug-in context information.

Returns

This method returns 0 in case of success or an integer greater than 0 in case of failure.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     int i = videoObj.closeSource(ctx);
}
catch(SQLException e){
     .
     .
     .
}

where:


trimSource( ) Method

Format

public int trimSource(byte[ ] ctx, int newLen)
throws SQLException

Scope

public

Description

Trims the server-side ORDVideo object file source to the given length.

Parameters

ctx

The source plug-in context information.

newLen

The length to which the source will be trimmed.

Returns

This method returns 0 in case of success or an integer greater than 0 in case of failure.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     .
     .
     .
     int i = videoObj.trimSource(ctx, 100);
}
catch(SQLException e){
     .
     .
     .
}

where:


readFromSource( ) Method

Format

public int readFromSource(byte[ ] ctx, int startPos, int numBytes,
                           byte[ ] buffer)
throws SQLException

Scope

public

Description

Reads a buffer of a given number of bytes from a server-side ORDVideo object source, beginning at a given initial position.

Parameters

ctx

The source plug-in context information.

startPos

The position where the method begins reading.

numBytes

The amount that will be read, in bytes.

buffer

The buffer into which the data will be read.

Returns

This method returns the amount of data read, in bytes.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     byte[ ] my_buffer;
     .
     .
     .
     videoObj.readFromSource(ctx, 0, 100, my_buffer);
}
catch(SQLException e){
     .
     .
     .
}

where:


writeToSource( ) Method

Format

public int writeToSource(byte[ ] ctx, int startPos, int numBytes,
                          byte[ ] buffer)
throws SQLException

Scope

public

Description

Writes a buffer of a given number of bytes to the server-side ORDVideo object source, beginning at a given initial position.

Parameters

ctx

The source plug-in context information.

startPos

The initial position where the written data will be inserted.

numBytes

The number of bytes to be written.

buffer

The content to be written.

Returns

This method returns the amount of data written, in bytes.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     byte[ ] my_buffer;
     .
     .
     .
     videoObj.writeToSource(ctx, 0, 100, my_buffer);
}
catch(SQLException e){
     .
     .
     .
}

where:

7.2.10 ORDVideo Methods Associated with Source Content Operations

This section presents reference information on the ORDVideo methods associated with source content operations.

See Section 7.2.1 for additional code required to run the example code.


getContentInLob( ) Method

Format

public BLOB getContentInLob(byte[ ] ctx, StringBuffer mimeType,
                            StringBuffer format)
throws SQLException

Scope

public

Description

Gets the contents of the server-side ORDVideo object localData attribute and stores them in a temporary BLOB.

Parameters

ctx

The source plug-in context information.

mimeType

The MIME type of the temporary BLOB.

format

The format of the temporary BLOB.

Returns

This method returns the BLOB into which the contents have been copied.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     String mimeType = "video/mpi";
     String format = "mpi";
     .
     .
     .
     BLOB blob = videoObj.getContentInLob(ctx, mimeType, format);
}
catch(SQLException e){
     .
     .
     .
}

where:

7.2.11 ORDVideo Methods Associated with Processing Video Data

This section presents reference information on the ORDVideo methods associated with processing video data.

See Section 7.2.1 for additional code required to run the example code.


processSourceCommand( ) Method

Format

public byte[ ] processSourceCommand(byte[ ] ctx, String cmd, String args,
                                   byte[ ] result)
throws SQLException

Scope

public

Description

Calls the server-side processSourceCommand( ) method.

For more information on the commands that can be processed, see Oracle8i interMedia Audio, Image, and Video User's Guide and Reference.

Parameters

ctx

The source plug-in context information.

cmd

The command that is to be executed.

args

The arguments for the command that is to be executed.

result

The result of the command that is to be executed.

Returns

This method returns the results of the command execution.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     String cmd = "compress";
     String arg_list = "compression_type";
     .
     .
     .
     byte[ ] result = videoObj.processSourceCommand(ctx, cmd, arg_list, 
          the_result);
}
catch(SQLException e){
     .
     .
     .
}

where:


processVideoCommand( ) Method

Format

public byte[ ] processVideoCommand(byte[ ] ctx, String cmd, String args,
                                  byte[ ] result)
throws SQLException

Scope

public

Description

Calls the server-side processVideoCommand( ) method.

For more information on the commands that can be processed, see Oracle8i interMedia Audio, Image, and Video User's Guide and Reference.

Parameters

ctx

The format plug-in context information.

cmd

The command that is to be executed.

args

The arguments for the command that is to be executed.

result

The result of the command that is to be executed. The memory for this variable is allocated by the client.

Returns

This method returns the results of the execution of the command.

Exceptions

java.sql.SQLException

Usage

try{
     OrdVideo videoObj = new OrdVideo(connection);
     byte[ ] ctx = new byte[4000];
     String cmd = "compress";
     String arg_list = "compression_type";
     .
     .
     .
     byte[ ] result = videoObj.processVideoCommand(ctx, cmd, arg_list, 
          the_result);
}
catch(SQLException e){
     .
     .
     .
}

where:

7.3 FrameDimension Methods

This section presents FrameDimension reference information on the methods used for setting and returning video width and height information. These methods are described in the following groupings:

FrameDimension Methods Associated with the width Attribute

FrameDimension Methods Associated with the height Attribute

7.3.1 FrameDimension Methods Associated with the width Attribute

This section presents reference information on the FrameDimension methods associated with the width attribute.


setWidth( ) Method

Format

public void setWidth(int the_width)

Scope

public

Description

Sets the width in the ORDVideo object.

Parameter

the_width

The width value to be set.

Returns

None.

Exceptions

None.


getWidth( ) Method

Format

public int getWidth( )

Scope

public

Description

Gets the width in the ORDVideo object.

Parameter

None.

Returns

This method returns the width value.

Exceptions

None.

7.3.2 FrameDimension Methods Associated with the height Attribute

This section presents reference information on the FrameDimension methods associated with the height attribute.


setHeight( ) Method

Format

public void setHeight(int the_height)

Scope

public

Description

Sets the height in the ORDVideo object.

Parameter

the_height

The height value to be set.

Returns

None.

Exceptions

None.


getHeight( ) Method

Format

public int getHeight( )

Scope

public

Description

Gets the height in the ORDVideo object.

Parameter

None.

Returns

This method returns the height value.

Exceptions

None.




Prev

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index