Alternative to setBinaryStream

From: "NSB)Hiroshi Kasamatsu" <hkasa(at)fancy(dot)ocn(dot)ne(dot)jp>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Alternative to setBinaryStream
Date: 2001-02-26 04:35:30
Message-ID: 3A99DD12.585E8854@fancy.ocn.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Katsuyuki Tanaka 2001-02-26 05:06:56 IPC Shared Memory (fwd)
Previous Message Tatsuo Ishii 2001-02-26 04:19:33 Re: pgaccess Japanese input capability patch