All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.AS400JDBCBlobLocator

java.lang.Object
   |
   +----com.ibm.as400.access.AS400JDBCBlobLocator

public class AS400JDBCBlobLocator
extends Object
implements Blob
The AS400JDBCBlobLocator class provides access to binary large objects. The data is valid only within the current transaction.


Method Index

 o getBinaryStream()
Returns the entire blob as a stream of uninterpreted bytes.
 o getBytes(long, int)
Returns part of the contents of the blob.
 o length()
Returns the length of the blob.
 o position(Blob, long)
Returns the position at which a pattern is found in the blob.
 o position(byte[], long)
Returns the position at which a pattern is found in the blob.

Methods

 o getBinaryStream
 public InputStream getBinaryStream() throws SQLException
Returns the entire blob as a stream of uninterpreted bytes.

Returns:
The stream.
Throws: SQLException
If an error occurs.
 o getBytes
 public byte[] getBytes(long start,
                        int length) throws SQLException
Returns part of the contents of the blob.

Parameters:
start - The position within the blob (0-based).
length - The length to return.
Returns:
The contents.
Throws: SQLException
If the position is not valid, if the length is not valid, or an error occurs.
 o length
 public long length() throws SQLException
Returns the length of the blob.

Returns:
The length of the blob, in bytes.
Throws: SQLException
If an error occurs.
 o position
 public long position(byte pattern[],
                      long start) throws SQLException
Returns the position at which a pattern is found in the blob.

Parameters:
pattern - The pattern.
start - The position within the blob to begin searching (0-based).
Returns:
The position at which the pattern is found, or -1 if the pattern is not found.
Throws: SQLException
If the pattern is null, the position is not valid, or an error occurs.
 o position
 public long position(Blob pattern,
                      long start) throws SQLException
Returns the position at which a pattern is found in the blob.

Parameters:
pattern - The pattern.
start - The position within the blob to begin searching (0-based).
Returns:
The position at which the pattern is found, or -1 if the pattern is not found.
Throws: SQLException
If the pattern is null, the position is not valid, or an error occurs.

All Packages  Class Hierarchy  This Package  Previous  Next  Index