📄 oracle.sql.bfile.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><!--NewPage--><html><head><!-- Generated by javadoc on Thu Dec 02 03:30:11 PST 1999 --><title> Class oracle.sql.BFILE</title></head><body><a name="_top_"></a><pre><a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-oracle.sql.html">This Package</a> <a href="oracle.sql.ArrayDescriptor.html#_top_">Previous</a> <a href="oracle.sql.BLOB.html#_top_">Next</a> <a href="AllNames.html">Index</a></pre><hr><h1> Class oracle.sql.BFILE</h1><pre>oracle.sql.BFILE</pre><hr><dl> <dt> public class <b>BFILE</b></dl>This class will implements the java.sql.Bfile interface in JDBC 2.0It provides the native implementation of the Bfile methods.<p><hr><a name="index"></a><h2> <img src="images/method-index.gif" width=207 height=38 alt="Method Index"></h2><dl> <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#asciiStreamValue()"><b>asciiStreamValue</b></a>() <dd> Convert to an ascii stream representation of the datum object <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#closeFile()"><b>closeFile</b></a>() <dd> Close the FILE. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#fileExists()"><b>fileExists</b></a>() <dd> Find out if a given BFILE (whose locator) points to a file that actually exists on the server's filesystem. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getBinaryStream()"><b>getBinaryStream</b></a>() <dd> Retrieve the entire BFILE as a stream. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getBytes(long, int)"><b>getBytes</b></a>(long, int) <dd> Return a copy of the contents of the BFILE at the requested position. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getBytes(long, int, byte[])"><b>getBytes</b></a>(long, int, byte[]) <dd> Copy the contents of the BFILE at the requested position to suppied buffer. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getConnection()"><b>getConnection</b></a>() <dd> Get connection object. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getDirAlias()"><b>getDirAlias</b></a>() <dd> Gets the Bfile's directory alias. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getName()"><b>getName</b></a>() <dd> Gets the Bfile's file name. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#isConvertibleTo(java.lang.Class)"><b>isConvertibleTo</b></a>(Class) <dd> Test whether this data object can be converted to the specifiedJava data type. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#isFileOpen()"><b>isFileOpen</b></a>() <dd> Find out whether a BFILE was opened with the give BFILE. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#length()"><b>length</b></a>() <dd> The length of the BFILE in bytes. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#openFile()"><b>openFile</b></a>() <dd> Open the FILE. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#position(oracle.sql.BFILE, long)"><b>position</b></a>(BFILE, long) <dd> Determine the byte position at which the given pattern <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#position(byte[], long)"><b>position</b></a>(byte[], long) <dd> Determine the byte position at which the given byte pattern <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#toJdbc()"><b>toJdbc</b></a>() <dd> Convert this data object into its default Java object type.</dl><a name="methods"></a><h2> <img src="images/methods.gif" width=151 height=38 alt="Methods"></h2><a name="length()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="length"><b>length</b></a><pre> public long length() throws SQLException</pre><dl> <dd> The length of the BFILE in bytes.<p> <dd><dl> <dt> <b>Returns:</b> <dd> length of the BFILE in bytes </dl></dd></dl><a name="getBytes(long, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getBytes"><b>getBytes</b></a><pre> public byte[] getBytes(long pos, int length) throws SQLException</pre><dl> <dd> Return a copy of the contents of the BFILE at the requested position.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> pos - is the first byte of the bfile to be extracted. <dd> length - is the number of consecutive bytes to be copied. <dt> <b>Returns:</b> <dd> a byte array containing a portion of the BFILE </dl></dd></dl><a name="getBytes(long, int, byte[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getBytes"><b>getBytes</b></a><pre> public int getBytes(long pos, int length, byte buf[]) throws SQLException</pre><dl> <dd> Copy the contents of the BFILE at the requested position to suppied buffer.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> pos - is the first byte of the bfile to be extracted. <dd> length - is the number of consecutive bytes to be copied. <dd> buf - is the buffer to had the extracted bytes. <dt> <b>Returns:</b> <dd> a byte array containing a portion of the BFILE </dl></dd></dl><a name="getBinaryStream()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getBinaryStream"><b>getBinaryStream</b></a><pre> public InputStream getBinaryStream() throws SQLException</pre><dl> <dd> Retrieve the entire BFILE as a stream.<p> <dd><dl> <dt> <b>Returns:</b> <dd> a stream containing the BFILE data </dl></dd></dl><a name="position(byte[], long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="position"><b>position</b></a><pre> public long position(byte pattern[], long start) throws SQLException</pre><dl> <dd> Determine the byte position at which the given byte pattern<p> <dd><dl> <dt> <b>Parameters:</b> <dd> pattern - is the pattern to search for. <dd> start - is the position at which to begin searching. <dt> <b>Returns:</b> <dd> the position at which the pattern appears, else -1. </dl></dd></dl><a name="position(oracle.sql.BFILE, long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="position"><b>position</b></a><pre> public long position(<a href="#_top_">BFILE</a> pattern, long start) throws SQLException</pre><dl> <dd> Determine the byte position at which the given pattern<p> <dd><dl> <dt> <b>Parameters:</b> <dd> searchstr - is the pattern to search for. <dd> start - is the position at which to begin searching. <dt> <b>Returns:</b> <dd> the position at which the pattern appears, else -1. </dl></dd></dl><a name="getName()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getName"><b>getName</b></a><pre> public String getName() throws SQLException</pre><dl> <dd> Gets the Bfile's file name.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> bfile - The Bfile for which to get the file name. <dt> <b>Returns:</b> <dd> The file name. </dl></dd></dl><a name="getDirAlias()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getDirAlias"><b>getDirAlias</b></a><pre> public String getDirAlias() throws SQLException</pre><dl> <dd> Gets the Bfile's directory alias.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> bfile - The Bfile for which to get the directory alias. <dt> <b>Returns:</b> <dd> The directory alias name. </dl></dd></dl><a name="openFile()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="openFile"><b>openFile</b></a><pre> public void openFile() throws SQLException</pre><dl> <dd> Open the FILE.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> bfile - The BFILE object to be opened. </dl></dd></dl><a name="isFileOpen()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="isFileOpen"><b>isFileOpen</b></a><pre> public boolean isFileOpen() throws SQLException</pre><dl> <dd> Find out whether a BFILE was opened with the give BFILE.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> bfile - The Bfile to be tested. <dt> <b>Returns:</b> <dd> true if the BFILE was opened, false if it was notopened. </dl></dd></dl><a name="fileExists()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="fileExists"><b>fileExists</b></a><pre> public boolean fileExists() throws SQLException</pre><dl> <dd> Find out if a given BFILE (whose locator) points to a file that actually exists on the server's filesystem.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> bfile - The Bfile to be tested. <dt> <b>Returns:</b> <dd> true if the physical file exists, false if itdoes not exist. </dl></dd></dl><a name="closeFile()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="closeFile"><b>closeFile</b></a><pre> public void closeFile() throws SQLException</pre><dl> <dd> Close the FILE.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> bfile - The Bfile to be closed. </dl></dd></dl><a name="getConnection()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getConnection"><b>getConnection</b></a><pre> public <a href="oracle.jdbc.driver.OracleConnection.html#_top_">OracleConnection</a> getConnection() throws SQLException</pre><dl> <dd> Get connection object.<p></dl><a name="toJdbc()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="toJdbc"><b>toJdbc</b></a><pre> public Object toJdbc() throws SQLException</pre><dl> <dd> Convert this data object into its default Java object type.<p> <dd><dl> <dt> <b>Returns:</b> <dd> this object. <dt> <b>Throws:</b> SQLException <dd> if any of the lower layer code throws an exception. </dl></dd></dl><a name="isConvertibleTo(java.lang.Class)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="isConvertibleTo"><b>isConvertibleTo</b></a><pre> public boolean isConvertibleTo(Class jClass)</pre><dl> <dd> Test whether this data object can be converted to the specifiedJava data type.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> jClassspecifies - the Java data type to test against. <dt> <b>Returns:</b> <dd> true if this data object is convertible to thespecified Java class, and a corresponding xxxValue()method is available; otherwise, a false is returned. </dl></dd></dl><a name="asciiStreamValue()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="asciiStreamValue"><b>asciiStreamValue</b></a><pre> public InputStream asciiStreamValue() throws SQLException</pre><dl> <dd> Convert to an ascii stream representation of the datum object<p> <dd><dl> <dt> <b>Returns:</b> <dd> ascii stream representation of the datum object <dt> <b>Throws:</b> SQLException, <dd> if no ascii stream representation exists </dl></dd></dl><hr><pre><a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-oracle.sql.html">This Package</a> <a href="oracle.sql.ArrayDescriptor.html#_top_">Previous</a> <a href="oracle.sql.BLOB.html#_top_">Next</a> <a href="AllNames.html">Index</a></pre></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -