getBytes(long pos, int length)
Syntax:
byte[] getBytes(long pos, int length) throws SQLException
Description:
Retrieves all or part of the BLOB
value that this Blob
object represents, as an array of bytes. This byte array contains up to length consecutive bytes starting at position pos
.
Parameters:
pos
the ordinal position of the first byte in the BLOB
value to be extracted; the first byte is at position 1
length
the number of consecutive bytes to be copied; the value for length
must be 0 or greater
Returns:
a byte array containing up to length consecutive bytes from the BLOB
value designated by this Blob
object, starting with the byte at position pos
Throws:
SQLException - if a database access error occurs, pos < 1, length is < 0, or (pos - 1) + length > the amount of data in the RDMBlob
Reference:
For more information, reference JDBC documentation for: Blob.getBytes(long, int)