Re: BLOB help - yes I've read around!

Поиск
Список
Период
Сортировка
От Brad Milne
Тема Re: BLOB help - yes I've read around!
Дата
Msg-id 49DBCBC2.6080402@yahoo.co.uk
обсуждение исходный текст
Ответ на Re: BLOB help - yes I've read around!  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: BLOB help - yes I've read around!  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-jdbc
Thomas Kellerer wrote:
> Brad Milne wrote on 07.04.2009 23:34:
>> For completeness, here is the setter again with a couple of fixes:
>>
>> stmt.setBinaryStream(2,in,in.available());
>
> Do not use availabe()
>
> This will *not* give you the number of bytes that are "available" in
> the stream.
>
> Read the Javadocs carefully: it will give you the number of bytes that
> can be /read without blocking/
>
> Most of the time this will not be the length of the stream.
>
Good point Thomas, I hear you. I shouldn't have written that hear as
others could follow that. In my implementation it is ok as the stream is
complete prior to persisting it. I have an AudioInputStream object, but
it is always complete. If you think I should be therefore using a
different method/db object then I'd be pleased to hear.

Thanks
Brad

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: BLOB help - yes I've read around!
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Array passing