pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Werner Donné <werner.donne@re.be>
To: pgsql-jdbc@postgresql.org
Subject: Re: binary data
Date: Tue, 7 Dec 2010 10:35:05 +0000 (UTC)
Message-ID: <loom.20101207T112628-767@post.gmane.org> (raw)
References: <CHECLDNPGHELOIINBBLEKEEEEIAA.donv@crusaders.no>

> 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.





view thread (15+ messages)  latest in thread

Message-ID: <loom.20101207T112628-767@post.gmane.org>
Permalink:  ../loom.20101207T112628-767@post.gmane.org/
Also on:    postgresql.org/message-id/loom.20101207T112628-767@post.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: werner.donne@re.be
  Subject: Re: binary data
  In-Reply-To: <loom.20101207T112628-767@post.gmane.org>
  References: <CHECLDNPGHELOIINBBLEKEEEEIAA.donv@crusaders.no> <loom.20101207T112628-767@post.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox