Skip site navigation (1) Skip section navigation (2)

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: aoki(at)acm(dot)org, pgsql-bugs(at)postgresql(dot)org
Cc: PostgreSQL jdbc list <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: no way in LargeObject API to detect short read?
Date: 2001-01-24 14:22:53
Message-ID: 200101241422.JAA15335@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-jdbc
Anyone able to fix this?

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


--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2001-01-24 14:34:37
Subject: Re: [BUGS] select cash_out('2'); crashes backend on 7.0.2
Previous:From: Bruce MomjianDate: 2001-01-24 14:19:43
Subject: Re: JDBC buggy in 7.1beta3

pgsql-jdbc by date

Next:From: Mirko ZeibigDate: 2001-01-24 14:43:38
Subject: JDBC: java.lang.ArrayIndexOutOfBoundsException: 256
Previous:From: Bruce MomjianDate: 2001-01-24 14:20:40
Subject: Re: [PATCHES] Patch for jdbc Makefile

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group