Oracle® interMedia Reference 10g Release 1 (10.1) Part Number B10829-01 |
|
|
View PDF |
Format
setMimeType(mime IN VARCHAR2);
Description
Lets you set the MIME type of the data.
Parameters
The MIME type.
Usage Notes
You can override the automatic setting of MIME information by calling this method with a specified MIME value.
Calling this method implicitly calls the setUpdateTime( ) method.
The method setProperties( ) calls this method implicitly.
For image objects, the methods process( ) and processCopy( ) also call this method implicitly.
Pragmas
None.
Exceptions
<object-type>Exceptions.INVALID_MIME_TYPE
This exception is raised if you call the setMimeType( ) method and the value for the mime parameter is NULL.
This exception can be raised by ORDAudio, ORDDoc, or ORDVideo object types. Replace <object-type> with the object type to which you apply this method.
Examples
Set the MIME type for some stored data:
DECLARE obj ORDSYS.ORDAudio; BEGIN SELECT p.product_audio INTO obj FROM pm.online_media p WHERE p.product_id = 1733 FOR UPDATE; DBMS_OUTPUT.PUT_LINE('writing current mimetype'); DBMS_OUTPUT.PUT_LINE('----------------'); DBMS_OUTPUT.PUT_LINE(obj.getMimeType); DBMS_OUTPUT.PUT_LINE('setting and writing new mimetype'); DBMS_OUTPUT.PUT_LINE('----------------'); obj.setMimeType('audio/basic'); DBMS_OUTPUT.PUT_LINE(obj.getMimeType); UPDATE pm.online_media p SET p.product_audio = obj WHERE p.product_id = 1733; COMMIT; END; /