Alternative to setBinaryStream
Alternative to setBinaryStream
От:
"NSB)Hiroshi Kasamatsu" <hkasa@fancy.ocn.ne.jp>
Дата:
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 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
Re: Alternative to setBinaryStream
От:
Peter Mount <peter@retep.org.uk>
Дата:
At 13:35 26/02/01 +0900, NSB)Hiroshi Kasamatsu wrote: > As of now,it seems that PreparedStatement.setBinaryStream is not >supported in PosrgreSQL-jdbc.But I sincerely need method similar to this >stream. Streams are supported in 7.1 Peter