All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oracle.sql.BLOB

oracle.sql.BLOB

public class BLOB
implements Blob

Method Index

 o getBinaryOutputStream()
Oracle extension.
 o getBinaryStream()
Implements the Blob interface function.
 o getBufferSize()
Oracle extension.
 o getBytes(long, int)
Implements the Blob interface function.
 o getBytes(long, int, byte[])
Oracle extension.
 o getChunkSize()
Oracle extension.
 o getConnection()
Oracle extension.
 o isConvertibleTo(Class)
Oracle extension.
 o length()
Implements the Blob interface function.
 o position(Blob, long)
Implements the Blob interface function.
 o position(byte[], long)
Implements the Blob interface function.
 o putBytes(long, byte[])
Oracle extension.
 o toJdbc()
Oracle extension.

Methods

 o length
 public long length() throws SQLException
Implements the Blob interface function. The length of the Binary Large OBject in bytes.

Returns:
length of the BLOB in bytes
 o getBytes
 public byte[] getBytes(long pos,
                        int length) throws SQLException
Implements the Blob interface function. Return a copy of the contents of the BLOB at the requested position.

Parameters:
pos - is the first byte of the blob to be extracted.
length - is the number of consecutive bytes to be copied.
Returns:
a byte array containing a portion of the BLOB
 o getBinaryStream
 public InputStream getBinaryStream() throws SQLException
Implements the Blob interface function. Retrieve the entire BLOB as a stream.

Returns:
a stream containing the BLOB data
 o position
 public long position(byte pattern[],
                      long start) throws SQLException
Implements the Blob interface function. Determine the byte position at which the given byte pattern

Parameters:
pattern - is the pattern to search for.
start - is the position at which to begin searching.
Returns:
the position at which the pattern appears, else -1.
 o position
 public long position(Blob pattern,
                      long start) throws SQLException
Implements the Blob interface function. Determine the byte position at which the given pattern

Parameters:
searchstr - is the pattern to search for.
start - is the position at which to begin searching.
Returns:
the position at which the pattern appears, else -1.
 o getBytes
 public int getBytes(long pos,
                     int length,
                     byte buf[]) throws 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
 o putBytes
 public int putBytes(long pos,
                     byte bytes[]) throws SQLException
Oracle extension. Put data to the BLOB at the requested position.

Parameters:
pos - is the position data to be put.
bytes - is the data to be written into BLOB.
Returns:
the number of bytes actually written.
 o getBinaryOutputStream
 public OutputStream getBinaryOutputStream() throws SQLException
Oracle extension. Write to the BLOB from a stream.

Returns:
a output stream to write data to the BLOB
 o getChunkSize
 public int getChunkSize() throws SQLException
Oracle extension. Get database LOB storage chunk size in database.

Returns:
size in bytes
 o getBufferSize
 public int getBufferSize() throws SQLException
Oracle extension. Get ideal LOB db access buffer size.

Returns:
size in bytes
 o getConnection
 public OracleConnection getConnection() throws SQLException
Oracle extension. Get connection object.

 o toJdbc
 public Object toJdbc() throws SQLException
Oracle extension. Convert this data object into its default Java object type.

Returns:
this object.
Throws: SQLException
if any of the lower layer code throws an exception.
 o isConvertibleTo
 public boolean isConvertibleTo(Class jClass)
Oracle extension. Test whether this data object can be converted to the specified Java data type.

Parameters:
jClass specifies - the Java data type to test against.
Returns:
true if this data object is convertible to the specified Java class, and a corresponding xxxValue() method is available; otherwise, a false is returned.

All Packages  Class Hierarchy  This Package  Previous  Next  Index