Re: [JDBC] no way in LargeObject API to detect short read?

From: Peter Mount <peter(at)retep(dot)org(dot)uk>
To: aoki(at)acm(dot)org, pgsql-bugs(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [JDBC] no way in LargeObject API to detect short read?
Date: 2001-01-30 23:31:53
Message-ID: 5.0.2.1.0.20010130233100.00a21860@mail.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-jdbc

At 01:58 14/11/00 -0500, pgsql-bugs(at)postgresql(dot)org wrote:
>Paul M. Aoki (aoki(at)acm(dot)org) reports a bug with a severity of 3
>The lower the number the more severe it is.
>
>Short Description
>no way in LargeObject API to detect short read?
>
>Long Description
>org.postgresql.largeobject.LargeObject.read(byte[],int,int) returns void
>instead of int. there's therefore no reliable, non-exceptional way to
>detect short reads.
>
>the natural way to write blocked-read loops would be to assume that
>read(byte[],int,int) returned the number of bytes read or (e.g.) -1 on EOF.
>
>Sample Code
>
>
>No file was uploaded with this report

This method now returns the number of bytes read. It will be in CVS by
0900GMT tomorrow.

Peter

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-01-31 15:51:53 cannot index functions with multiple arguments
Previous Message Christof Petig 2001-01-30 21:13:54 Re: ECPG, cursors and transactions

Browse pgsql-jdbc by date

  From Date Subject
Next Message v j 2001-01-31 05:09:47 JDBC Connection Problem
Previous Message Peter Mount 2001-01-30 23:28:14 Re: Re: [PATCHES] Re: [INTERFACES] Patch for JDBC timestamp problems