I suspect the problem is that you're setting the length based on the length of the file in bytes, whereas the parameter to setCharacterStream
is meant to be a length in characters.
You're also using the platform default encoding, which is rarely a good idea.
Do you know what encoding the data is in? If it's a fixed-width encoding, you can work out the number of characters from the number of bytes. Otherwise, you'd be better off calling the overload which doesn't specify the length:
pstmt1.setCharacterStream(6, reader);
(But do change your code to specify the encoding when you create the InputStreamReader
.)