Subject Re: Problem While Reading BLOB OBJECT-Jaybird Driver - binary to char conversion.
Author Roman Rokytskyy <rrokytskyy@acm.org>
Hi,

> Why make things difficult. Simply get the blob data by calling
>
> resultSet.getString();
>
> It has always worked for me. Or you can get it in another data type
> and convert it to a string.

Completely agree with William. In addition to simplicity rs.getString
(int) will correctly handle charset encoding issues and give you back
a correct string.

If you do want to use byte[], rs.getBytes(int) does exactly this.
Then you can create new string (note, encoding of bytes might be
different from default encoding of your JVM, you must use encoding
corresponding to lc_ctype property of your connection). So, if you
want to avoid all these complications, use rs.getString(int)

Best regards,
Roman Rokytskyy