Re: binary data - Mailing list pgsql-jdbc

From Uwe Kubosch
Subject Re: binary data
Date
Msg-id CHECLDNPGHELOIINBBLEMEEHEIAA.donv@crusaders.no
Whole thread Raw
In response to Re: binary data  (Anders Hermansen <anders@yoyo.no>)
Responses Re: binary data
Re: binary data
List pgsql-jdbc
Hi!

> Show us the code that saves the InputStream to a file.

This is a web-application that streams the InpuStream back to the browser.
The code that does this is like this:

byte[] buffer;
int bytesRead;

buffer = new byte[is.available()];

while (is.available() > 0) {
  bytesRead = is.read(buffer);
  response.getOutputStream().write(buffer, 0, bytesRead);
}

response.getOutputStream().flush();
is.close();


Uwe


pgsql-jdbc by date:

Previous
From: Anders Hermansen
Date:
Subject: Re: binary data
Next
From: Anders Hermansen
Date:
Subject: Re: binary data