X-Original-To: pgsql-jdbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id ECC7A4758C9 for ; Sun, 2 Mar 2003 10:17:26 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 52528-08 for ; Sun, 2 Mar 2003 10:17:23 -0500 (EST) Received: from mail59.fg.online.no (mail59-s.fg.online.no [148.122.161.59]) by postgresql.org (Postfix) with ESMTP id 0E50E475843 for ; Sun, 2 Mar 2003 10:17:23 -0500 (EST) Received: from kornelius (ti122110a080-2385.bb.online.no [80.213.201.81]) by mail59.fg.online.no (8.9.3/8.9.3) with ESMTP id QAA28850 for ; Sun, 2 Mar 2003 16:17:26 +0100 (MET) Received: from anders by kornelius with local (Exim 3.36 #1 (Debian)) id 18pVDS-0005G6-00 for ; Sun, 02 Mar 2003 16:17:26 +0100 Date: Sun, 2 Mar 2003 16:17:26 +0100 From: Anders Hermansen To: pgsql-jdbc@postgresql.org Subject: Re: binary data Message-ID: <20030302151726.GA20097@online.no> Mail-Followup-To: pgsql-jdbc@postgresql.org References: <20030302133457.GA18675@online.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Editor: Vim http://www.vim.org/ X-Operating-System: Linux/2.4.21-pre4-3 (i686) X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/16 X-Sequence-Number: 6557 * Uwe Kubosch (donv@crusaders.no) wrote: > This is a web-application that streams the InpuStream back to the browser. > The code that does this is like this: Can you try the following? Maybe the result slipped through the driver without being decoded? // I think this will work because the is is a ByteArrayInputStream byte[] buffer = new byte[is.available()]; is.read(buffer); byte[] buffer2 = org.postgresql.util.PGbytea.toBytes(buffer); response.getOutputStream().write(buffer2, 0, buffer2.length); response.getOutputStream().flush(); is.close(); Anders -- Anders Hermansen YoYo Mobile as