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

From: Peter T 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
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] no way in LargeObject API to detect short read?
Date: 2001-01-25 17:30:12
Message-ID: 980443812.3a7062a410511@webmail.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-jdbc

Quoting pgsql-bugs(at)postgresql(dot)org:

> 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?

Will check to see how libpq (which this API is based on) handles this. I've got
on my list of Saturday items the stream support, which will need this.

Peter

>
> 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
>
>
>

--
Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruno Wolff III 2001-01-25 23:56:55 Re: round - timestamp bug
Previous Message Peter T Mount 2001-01-25 13:38:06 Re: JDBC buggy in 7.1beta3

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tatsuo Ishii 2001-01-25 22:24:03 Re: Open 7.1 items
Previous Message Peter T Mount 2001-01-25 17:27:56 Re: [JDBC] JDBC: java.lang.ArrayIndexOutOfBoundsException: 256