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

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 (view raw or flat)
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

pgsql-interfaces by date

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

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