Alternative to setBinaryStream

Поиск
Список
Период
Сортировка
От NSB)Hiroshi Kasamatsu
Тема Alternative to setBinaryStream
Дата
Msg-id 3A99DD12.585E8854@fancy.ocn.ne.jp
обсуждение исходный текст
Ответы Re: Alternative to setBinaryStream  (Peter Mount <peter@retep.org.uk>)
Список pgsql-interfaces
  As of now,it seems that PreparedStatement.setBinaryStream is not
supported in PosrgreSQL-jdbc.But I sincerely need method similar to this
stream.
The reason is that in my servlet application jpg image is dynamically
displayed by <img
src=http://www.kasa.com/Image/servlet/ImageServlet?imgname=kasa.jpg>
tag.
Throughout this process,binary stream ,or getBinaryStream is used.
Therefore,image needs to be inserted into database by
PreparedStatement.setBinaryStream in advance.One suggestions from mailing list is using ByteArrayInputStream:
That is ,ByteArrayInputStream bi=new ByteArrayInputStream(bytes);
ps.setBinaryInputStream(imgoid,bi,bytes.length);
To be sorry,the result is the same:InputStream as parameter not
supported;

Please tell me an alternative to setBinaryStream.

Thanks in advance.


Hiroshi Kasamatsu







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

Предыдущее
От: Peter Mount
Дата:
Сообщение: Re: unable to find postgresql.jar
Следующее
От: Katsuyuki Tanaka
Дата:
Сообщение: IPC Shared Memory (fwd)