Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 76552 invoked from network); 26 Feb 2004 21:03:23 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 26 Feb 2004 21:03:23 -0000 Received: (qmail 36948 invoked by uid 500); 26 Feb 2004 21:02:52 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 36929 invoked by uid 500); 26 Feb 2004 21:02:52 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 36912 invoked from network); 26 Feb 2004 21:02:52 -0000 Received: from unknown (HELO mustang.mpi.com) (63.244.250.132) by daedalus.apache.org with SMTP; 26 Feb 2004 21:02:52 -0000 Received: from thunderbolt.mpi.com (thunderbolt [63.244.253.70]) by mustang.mpi.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id i1QKxiV15346 for ; Thu, 26 Feb 2004 15:59:44 -0500 (EST) Received: from US-VS1.corp.mpi.com (us-be1.corp.mpi.com [63.244.252.30]) by thunderbolt.mpi.com (Switch-3.0.5/Switch-3.0.0) with ESMTP id i1QL29wp015972 for ; Thu, 26 Feb 2004 16:02:43 -0500 (EST) X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Uploading Images in Oracle Date: Thu, 26 Feb 2004 16:01:46 -0500 Message-ID: <9C5166762F311146951505C6790A9CF8013DFDC8@US-VS1.corp.mpi.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Uploading Images in Oracle Thread-Index: AcP8qzIjmM5OkwCdS6uSNtQHY+/h6QAAB9XQ From: "Shapira, Yoav" To: "Tomcat Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Howdy, > java.io.OutputStream os =3D null; > os =3D ( (weblogic.jdbc.common.OracleBlob) >myBlob).getBinaryOutputStream(); Assuming myBlob is a java.sql.Blob, the shortest path for you to fix your code is os =3D myBlob.setBinaryStream(1); However, you can also write your bytes to a java.io.ByteArrayOutputStream and when finished, call myBlob.setBytes(...) with the contents of the stream. The advantage here is that you don't even have to open a DB connection until your bl= ob is ready. Using vendor-specific APIs for convenience when a portable alternative= is available will always get you ;) Yoav Shapira This e-mail, including any attachments, is a confidential business com= munication, and may contain information that is confidential, propriet= ary and/or privileged. This e-mail is intended only for the individua= l(s) to whom it is addressed, and may not be saved, copied, printed, d= isclosed or used by anyone else. If you are not the(an) intended reci= pient, please immediately delete this e-mail from your computer system= and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org