Re: BLOB help - yes I've read around!

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: BLOB help - yes I've read around!
Date: 2009-04-07 21:41:53
Message-ID: grgham$q84$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Brad Milne wrote on 07.04.2009 23:34:
> For completeness, here is the setter again
> with a couple of fixes:
>
> stmt.setBinaryStream(2,in,in.available());

Do not use availabe()

This will *not* give you the number of bytes that are "available" in the stream.

Read the Javadocs carefully: it will give you the number of bytes that can be
/read without blocking/

Most of the time this will not be the length of the stream.

Thomas

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Brad Milne 2009-04-07 21:55:14 Re: BLOB help - yes I've read around!
Previous Message Brad Milne 2009-04-07 21:34:20 Re: BLOB help - yes I've read around!