All Packages Class Hierarchy This Package Previous Next Index
Class oracle.sql.BLOB
oracle.sql.BLOB
- public class BLOB
- implements Blob
-
getBinaryOutputStream()
- Oracle extension.
-
getBinaryStream()
- Implements the Blob interface function.
-
getBufferSize()
- Oracle extension.
-
getBytes(long, int)
- Implements the Blob interface function.
-
getBytes(long, int, byte[])
- Oracle extension.
-
getChunkSize()
- Oracle extension.
-
getConnection()
- Oracle extension.
-
isConvertibleTo(Class)
- Oracle extension.
-
length()
- Implements the Blob interface function.
-
position(Blob, long)
-
Implements the Blob interface function.
-
position(byte[], long)
-
Implements the Blob interface function.
-
putBytes(long, byte[])
- Oracle extension.
-
toJdbc()
- Oracle extension.
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
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
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
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.
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.
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
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.
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
getChunkSize
public int getChunkSize() throws SQLException
- Oracle extension.
Get database LOB storage chunk size in database.
- Returns:
- size in bytes
getBufferSize
public int getBufferSize() throws SQLException
- Oracle extension.
Get ideal LOB db access buffer size.
- Returns:
- size in bytes
getConnection
public OracleConnection getConnection() throws SQLException
- Oracle extension.
Get connection object.
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.
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