setBinaryStream(long pos)

Syntax:

OutputStream setBinaryStream(long pos) throws SQLException

Description:

Retrieves a stream that can be used to write to the BLOB value that this Blob object represents. The stream begins at position pos. The bytes written to the stream will overwrite the existing bytes in the Blob object starting at the position pos. If the end of the Blob value is reached while writing to the stream, then the length of the Blob value will be increased to accommodate the extra bytes.

Parameters:

pos

the position in the BLOB value at which to start writing; the first position is 1

Returns:

Type: OutputStream 

a java.io.OutputStream object to which data can be written

Throws:

SQLException - if a database access error occurs or pos < 1

References:

For more information, reference JDBC documentation for: Blob.setBinaryStream(long)