Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 34137 invoked from network); 2 Oct 2006 08:02:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Oct 2006 08:02:11 -0000 Received: (qmail 40423 invoked by uid 500); 2 Oct 2006 08:02:10 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 40410 invoked by uid 500); 2 Oct 2006 08:02:09 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 40399 invoked by uid 99); 2 Oct 2006 08:02:09 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Oct 2006 01:02:09 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [72.21.53.35] ([72.21.53.35:51983] helo=talk.nabble.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id C1/F0-16499-087C0254 for ; Mon, 02 Oct 2006 01:02:08 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GUIkX-0002Tj-Vj for user-java@ibatis.apache.org; Mon, 02 Oct 2006 01:02:05 -0700 Message-ID: <6597309.post@talk.nabble.com> Date: Mon, 2 Oct 2006 01:02:05 -0700 (PDT) From: soussou97 To: user-java@ibatis.apache.org Subject: Re: Scanning byte array In-Reply-To: <2f55db670609290821h4297aa92tdd15f3878868b08a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: dboussebha@yahoo.fr References: <6563833.post@talk.nabble.com> <2f55db670609290821h4297aa92tdd15f3878868b08a@mail.gmail.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Nathan; Yes I would like to display the data via a GUI, so how I use a buffered reader to read the data ? Have you a example ? Thank's Nathan Maves-2 wrote: > > When you say scan are you looking for some specific bytes? If not > just use a buffered reader to read and display the data. > > On 9/29/06, soussou97 wrote: >> >> Hi; >> >> I have a method which return a byte array from a BLOB (Oracle) : >> >> public static byte[] getBLOB(int id, Connection conn) throws Exception { >> ResultSet rs = null; >> PreparedStatement pstmt = null; >> String query = "SELECT data FROM Table1 WHERE id = ?"; >> try { >> pstmt = conn.prepareStatement(query); >> pstmt.setInt(1, id); >> rs = pstmt.executeQuery(); >> rs.next(); >> Blob blob = rs.getBlob(1); >> return blob.getBytes(1, (int) blob.length()); >> } finally { >> rs.close(); >> pstmt.close(); >> conn.close(); >> } >> } >> >> } >> >> I must to scan the byte array position by position for extracting of the >> data contained into this array for a display in using a GUI. >> Which is the best (performance) solution to implemente this ? >> >> Regards; >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/Scanning-byte-array-tf2356548.html#a6563833 >> Sent from the iBATIS - User - Java mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/Scanning-byte-array-tf2356548.html#a6597309 Sent from the iBATIS - User - Java mailing list archive at Nabble.com.