X-Original-To: pgsql-jdbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CBD524758BD for ; Sun, 2 Mar 2003 09:37:29 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 32852-08 for ; Sun, 2 Mar 2003 09:37:27 -0500 (EST) Received: from mail44.fg.online.no (mail44-s.fg.online.no [148.122.161.44]) by postgresql.org (Postfix) with ESMTP id E0193475843 for ; Sun, 2 Mar 2003 09:37:26 -0500 (EST) Received: from kornelius (ti122110a080-2385.bb.online.no [80.213.201.81]) by mail44.fg.online.no (8.9.3/8.9.3) with ESMTP id PAA08556 for ; Sun, 2 Mar 2003 15:37:30 +0100 (MET) Received: from anders by kornelius with local (Exim 3.36 #1 (Debian)) id 18pUao-00057V-00 for ; Sun, 02 Mar 2003 15:37:30 +0100 Date: Sun, 2 Mar 2003 15:37:30 +0100 From: Anders Hermansen To: pgsql-jdbc@postgresql.org Subject: Re: binary data Message-ID: <20030302143730.GA19602@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/14 X-Sequence-Number: 6555 * 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: > > byte[] buffer; > int bytesRead; > > buffer = new byte[is.available()]; > > while (is.available() > 0) { > bytesRead = is.read(buffer); > response.getOutputStream().write(buffer, 0, bytesRead); > } > > response.getOutputStream().flush(); > is.close(); I can't see anything in your code that is not binary safe, or I'm missing something obvious just like you. Maybe the gurus know. Anders -- Anders Hermansen YoYo Mobile as