From: Anders Hermansen <anders@yoyo.no>
To: pgsql-jdbc@postgresql.org
Subject: Re: binary data
Date: Sun, 2 Mar 2003 16:17:26 +0100
Message-ID: <20030302151726.GA20097@online.no> (raw)
In-Reply-To: <CHECLDNPGHELOIINBBLEMEEHEIAA.donv@crusaders.no>
References: <20030302133457.GA18675@online.no>
<CHECLDNPGHELOIINBBLEMEEHEIAA.donv@crusaders.no>
* Uwe Kubosch (donv@crusaders.no) wrote:
> This is a web-application that streams the InpuStream back to the browser.
> The code that does this is like this:
Can you try the following? Maybe the result slipped through the driver
without being decoded?
// I think this will work because the is is a ByteArrayInputStream
byte[] buffer = new byte[is.available()];
is.read(buffer);
byte[] buffer2 = org.postgresql.util.PGbytea.toBytes(buffer);
response.getOutputStream().write(buffer2, 0, buffer2.length);
response.getOutputStream().flush();
is.close();
Anders
--
Anders Hermansen
YoYo Mobile as
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: anders@yoyo.no
Subject: Re: binary data
In-Reply-To: <20030302151726.GA20097@online.no>
References: <20030302133457.GA18675@online.no> <CHECLDNPGHELOIINBBLEMEEHEIAA.donv@crusaders.no> <20030302151726.GA20097@online.no>
* 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