setString(long pos, String str, int offset, int len)

Syntax:

int setString(long pos, String str, int offset, int len) throws SQLException

Description:

Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents. The string will overwrite the existing characters in the Clob object starting at the position pos. If the end of the Clob value is reached while writing the given string, then the length of the Clob value will be increased to accommodate the extra characters.

Parameters:

pos

the position in the CLOB object at which to start writing; the first position is 1

str

the string to be written to the CLOB value that this Clob object represents

offset

the offset into str at which to start reading the characters to be written

len

the number of characters to be written

Returns:

the number of characters written

Throws:

SQLException - if a database access error occurs, pos < 1, str is null, offset < 0, len < 0 or offset + len > str.length()

References:

For more information, reference JDBC documentation for: Clob.setString(long, String, int, int)