Skip navigation links

Oracle Database JDBC Java API Reference
11g Release 2

E13995-03


oracle.jdbc
Interface OracleBlob

All Superinterfaces:
java.sql.Blob
All Known Implementing Classes:
BLOB

public interface OracleBlob
extends java.sql.Blob
Since:
release specific (what release of product did this appear in)

Method Summary
 void close()
          Close a previously opened BLOB.
 java.io.InputStream getBinaryStream(long pos)
          Read from the BLOB as a stream at the requested position.
 int getBytes(long pos, int length, byte[] buf)
          Oracle extension.
 boolean isEmptyLob()
          Return true if the lob locator points to a empty blob.
 boolean isOpen()
          Check whether the BLOB is opened.
 boolean isSecureFile()
          Returns true if this is a SecureFile (LOBs with the STORE AS SECUREFILE option, which were introduced in Oracle Database 11g Release 1).
 boolean isTemporary()
          Return true if the lob locator points to a temporary blob.
 void open(LargeObjectAccessMode mode)
          Open a BLOB in the indicated mode.

 

Methods inherited from interface java.sql.Blob
getBinaryStream, getBytes, length, position, position, setBinaryStream, setBytes, setBytes, truncate

 

Method Detail

open

void open(LargeObjectAccessMode mode)
          throws java.sql.SQLException
Open a BLOB in the indicated mode. Valid modes include MODE_READONLY, and MODE_READWRITE. It is an error to open the same LOB twice.
Throws:
java.sql.SQLException
Since:
8.2.0

close

void close()
           throws java.sql.SQLException
Close a previously opened BLOB.
Throws:
java.sql.SQLException
Since:
8.2.0

isOpen

boolean isOpen()
               throws java.sql.SQLException
Check whether the BLOB is opened.
Returns:
true if the LOB is opened.
Throws:
java.sql.SQLException
Since:
8.2.0

getBytes

int getBytes(long pos,
             int length,
             byte[] buf)
             throws java.sql.SQLException
Oracle extension. Copy the contents of the BLOB at the requested position to suppied buffer.
Parameters:
pos - is the first byte of the blob to be extracted.
length - is the number of consecutive bytes to be copied.
buf - is the buffer to had the extracted bytes.
Returns:
a byte array containing a portion of the BLOB
Throws:
java.sql.SQLException

isEmptyLob

boolean isEmptyLob()
                   throws java.sql.SQLException
Return true if the lob locator points to a empty blob. False if it does not.
Returns:
true if the lob locator points to a empty blob. False if it does not.
Throws:
java.sql.SQLException
Since:
8.1.7

isSecureFile

boolean isSecureFile()
                     throws java.sql.SQLException
Returns true if this is a SecureFile (LOBs with the STORE AS SECUREFILE option, which were introduced in Oracle Database 11g Release 1).
Returns:
true if this is a SecureFile and false otherwise.
Throws:
java.sql.SQLException

getBinaryStream

java.io.InputStream getBinaryStream(long pos)
                                    throws java.sql.SQLException
Read from the BLOB as a stream at the requested position.
Parameters:
pos - is the position data to be read.
Returns:
a input stream to read data from the BLOB
Throws:
java.sql.SQLException
Since:
8.2.0

isTemporary

boolean isTemporary()
                    throws java.sql.SQLException
Return true if the lob locator points to a temporary blob. False if it does not.
Returns:
true if the lob locator points to a temporary blob. False if it does not.
Throws:
java.sql.SQLException
Since:
8.2.0

Skip navigation links

Oracle Database JDBC Java API Reference
11g Release 2

E13995-03


Copyright © 2009, Oracle and/or its affiliates. All rights reserved.