Retrieves all or part of the
BLOB
value that this
Blob
object represents, as an array of
bytes.
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
.
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
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
Throws:
-
SQLException - if there is an error accessing the
BLOB
value; if pos is less than 1 or length is
less than 0
-
SQLFeatureNotSupportedException - if the JDBC driver does not support
this method
Since:
1.2
See Also:
Blob.setBytes(long, byte[])
,