X-Original-To: pgsql-jdbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 111F7474E5C for ; Sun, 2 Mar 2003 08:21:06 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 06551-04 for ; Sun, 2 Mar 2003 08:21:02 -0500 (EST) Received: from mail44.fg.online.no (mail44-s.fg.online.no [148.122.161.44]) by postgresql.org (Postfix) with ESMTP id 83581474E42 for ; Sun, 2 Mar 2003 08:21:01 -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 OAA11461 for ; Sun, 2 Mar 2003 14:21:03 +0100 (MET) Received: from anders by kornelius with local (Exim 3.36 #1 (Debian)) id 18pTOm-0004mh-00 for ; Sun, 02 Mar 2003 14:21:00 +0100 Date: Sun, 2 Mar 2003 14:21:00 +0100 From: Anders Hermansen To: pgsql-jdbc@postgresql.org Subject: Re: binary data Message-ID: <20030302132100.GA18201@online.no> Mail-Followup-To: pgsql-jdbc@postgresql.org References: 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/10 X-Sequence-Number: 6551 * Uwe Kubosch (donv@crusaders.no) wrote: > Hi all! Hi > I fetch the image back from the database with code similar to this: > > String query; > ResultSet resultSet; > > query = "SELECT content FROM tfile WHERE id=4"; > resultSet = null; > > try { > boolean more; > > resultSet = executeTheQuery(query); > more = resultSet.next(); > > if (more) { > InputStream is; > > is = resultSet.getBinaryStream("content"); > setContent(is); Why don't you show us the setContent method? > } > } catch (SQLException anSQLException) { > } Anders -- Anders Hermansen YoYo Mobile as