Re: binary data

Поиск
Список
Период
Сортировка
От Anders Hermansen
Тема Re: binary data
Дата
Msg-id 20030302151726.GA20097@online.no
обсуждение исходный текст
Ответ на Re: binary data  ("Uwe Kubosch" <donv@crusaders.no>)
Ответы Re: binary data
Список pgsql-jdbc
* 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Uwe Kubosch"
Дата:
Сообщение: Re: binary data
Следующее
От: "Uwe Kubosch"
Дата:
Сообщение: Re: binary data