Writes all or part of the given
byte
array to the
BLOB
value that this
Blob
object represents
and returns the number of bytes written.
Writing starts at position
pos
in the
BLOB
value;
len bytes from the given byte array are written.
Returns:
the number of bytes written
Parameters:
-
pos - the position in the
BLOB
object at which
to start writing. The first position is
1
;
must not be less than
1
nor greater than
the length of this
SerialBlob
object.
-
bytes - the array of bytes to be written to the
BLOB
value
-
offset - the offset in the
byte
array at which
to start reading the bytes. The first offset position is
0
; must not be less than
0
nor greater
than the length of the
byte
array
-
length - the number of bytes to be written to the
BLOB
value from the array of bytes
bytes.
Throws:
-
SerialException - if there is an error accessing the
BLOB
value; if an invalid position is set; if an
invalid offset value is set; if number of bytes to be written
is greater than the
SerialBlob
length; or the combined
values of the length and offset is greater than the Blob buffer
-
SQLException - if there is an error accessing the
BLOB
value from the database.
See Also:
SerialBlob.getBytes(long, int)
,