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

Поиск
Список
Период
Сортировка
От Peter T Mount
Тема Re: [BUGS] no way in LargeObject API to detect short read?
Дата
Msg-id 980443812.3a7062a410511@webmail.retep.org.uk
обсуждение исходный текст
Ответ на [BUGS] no way in LargeObject API to detect short read?  (pgsql-bugs@postgresql.org)
Список pgsql-jdbc
Quoting pgsql-bugs@postgresql.org:

> Paul M. Aoki (aoki@acm.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@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Peter T Mount
Дата:
Сообщение: Re: [GENERAL] JDBC: java.lang.ArrayIndexOutOfBoundsException: 256
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: [HACKERS] Open 7.1 items