Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and - Mailing list pgsql-bugs

From Martin Holz
Subject Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and
Date
Msg-id 200401091807.53274.holz@fiz-chemie.de
Whole thread Raw
In response to Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and  (Kris Jurka <books@ejurka.com>)
List pgsql-bugs
On Friday 09 January 2004 17:18, Kris Jurka wrote:

> I was referring to the documentation for setBinaryStream.  You
> mentioned that it should throw an Exception if it couldn't read
> "length" bytes from the stream.  I was commenting that our
> implementation might be wrong by checking the length at all.

Sorry for not being precise. There are two different issues.
1) The way the InputStream is read is clearly wrong.
    This should be fixed.
2) What to do, when the size of the input stream does
   not match the lenght argument of Statement.setBinaryStream()
  There are two options
    a) Throw a exception
    b) Silently send all bytes, that are available.

   I don't really understand what the length argument is good for
   and think, that this is a design flaw made by Sun. I would prefer
   a), but I am not sure here.


Martin

--
Martin Holz     <holz@fiz-chemie.de>

Softwareentwicklung / Vernetztes Studium - Chemie
FIZ CHEMIE Berlin
Franklin Str. 11
D-10587 Berlin

pgsql-bugs by date:

Previous
From: Kris Jurka
Date:
Subject: Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and
Next
From: "Esh, Andrew"
Date:
Subject: