From: NSB)Hiroshi Kasamatsu <hkasa@fancy.ocn.ne.jp>
To: pgsql-interfaces@postgresql.org
Subject: Alternative to setBinaryStream
Date: Mon, 26 Feb 2001 13:35:30 +0900
Message-ID: <3A99DD12.585E8854@fancy.ocn.ne.jp> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: hkasa@fancy.ocn.ne.jp
Subject: Re: Alternative to setBinaryStream
In-Reply-To: <3A99DD12.585E8854@fancy.ocn.ne.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox