Table of Contents
This chapter briefly introduces the DBMS_JAVA package, and describes how to use the procedures and functions of the package.
Outputs a Java object on the screen, and uses a buffer as large as the specified input value.
Details about the SET_OUTPUT procedure are as follows:
Prototypes
PROCEDURE SET_OUTPUT ( bufsize IN NUMBER DEFAULT 2000 );
Parameters
Parameter | Description |
---|---|
bufsize | Output buffer size. |
Examples
call DBMS_JAVA.SET_OUTPUT(); call DBMS_JAVA.SET_OUTPUT(5000);
This section describes the functions provided by the DBMS_JAVA package, in alphabetical order.
Returns the full name of a Java object.
Details about the LONGNAME function are as follows:
Prototypes
FUNCTION LONGNAME ( shortname IN VARCHAR2 ) RETURN VARCHAR2;
Parameters
Parameter | Description |
---|---|
shortname | Short name of the Java object. |
Examples
SELECT dbms_java.longname(object_name) FROM user_objects WHERE object_type='JAVA CLASS' AND status='VALID';
Returns the short name of a Java object when its full name is too long.
Details about the SHORTNAME function are as follows:
Prototypes
FUNCTION SHORTNAME ( longname IN VARCHAR2 ) RETURN VARCHAR2;
Parameters
Parameter | Description |
---|---|
longname | Full name of the Java object |
Examples
DECLARE short_java_object_name VARCHAR2(128); long_laga_object_name VARCHAR2(128) ; BEGIN ... short_java_object_name := dbms_java.shortname(long_java_object_name); END;