| From: | Werner Donné <werner(dot)donne(at)re(dot)be> |
|---|---|
| To: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: binary data |
| Date: | 2010-12-07 10:35:05 |
| Message-ID: | loom.20101207T112628-767@post.gmane.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
> String query;
> ResultSet resultSet;
>
> query = "SELECT content FROM tfile WHERE id=4";
> resultSet = null;
>
> try {
> boolean more;
>
> resultSet = executeTheQuery(query);
> more = resultSet.next();
>
> if (more) {
> InputStream is;
>
> is = resultSet.getBinaryStream("content");
> setContent(is);
> }
> } catch (SQLException anSQLException) {
> }
Hi,
I have the same problem. I'm using PostgreSQL 9.0.1, which came with
postgresql-8.4-701.jdbc4.jar. The database is using the UTF8-encoding.
The getInputStream() method seems to return the encoded byte stream
instead of the decoded one.
Best regards,
Werner.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Werner Donné | 2010-12-07 11:04:38 | Re: binary data |
| Previous Message | Guillaume Cottenceau | 2010-12-07 09:59:30 | Re: Out Of memory Exception |