Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 92324 invoked from network); 30 Jan 2007 01:44:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jan 2007 01:44:36 -0000 Received: (qmail 82224 invoked by uid 500); 30 Jan 2007 01:44:41 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 82204 invoked by uid 500); 30 Jan 2007 01:44:41 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 82195 invoked by uid 99); 30 Jan 2007 01:44:41 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jan 2007 17:44:41 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jan 2007 17:44:30 -0800 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1HBi2c-00087K-45 for activemq-users@geronimo.apache.org; Mon, 29 Jan 2007 17:44:10 -0800 Message-ID: <8702029.post@talk.nabble.com> Date: Mon, 29 Jan 2007 17:44:10 -0800 (PST) From: cafe To: activemq-users@geronimo.apache.org Subject: Possible bug in activeMQ4.1.0 with Streams? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: rmilian@estudiantes.uci.cu X-Virus-Checked: Checked by ClamAV on apache.org I have a simple program that sends a stream to a queue,=20 =E2=80=A6 OutputStream out =3D connection.createOutputStream(destination); =09=09 =09=09File file =3D new File("D:/file.xml"); =09=09=09 =09=09FileInputStream fis =3D new FileInputStream(file); =09=09 =09=09int l; =09=09byte[] array =3D new byte[1024]; =09=09 =09=09while ( (l =3D fis.read(array)) !=3D -1 ){ =09=09=09out.write(array); =09=09 =09=09} And in the other side a simple program who receive the stream: =09=09InputStream fis =3D connection.createInputStream(destination); =09=09FileOutputStream out =3D new FileOutputStream("D:/Newfile.xml"); =09=09int l; =09=09byte[] array=3D new byte[1024]; =09=09 =09=09while ((l =3D fis.read(array)) > 0) { =09=09=09out.write(array); =09=09} The problem is that activeMQ is putting more bytes to the stream, for example I have run these programs with the following input (file.xml): 1 2 3 4 5 6 7 8 9 And I obtain the following file (NewFile.xml) 1 2 3 4 5 6 7 8 9 ___________________________________________________________________________= ___________________________________________________________________________= ___________________________________________________________________________= ___________________________________________________________________________= ___________________________________________________________________________= ___________________________________________________________________________= ___________________________________________________________________________= ___________________________________________________________________________= ___________________________________________________________________________= ___________________________________________________________________________= ___________________________________________________________________________= ___________________________________________________________________________= ___________________________________________________________________________= ____________________=20 note: the line above are the byte added by activeMQ What could be this? --=20 View this message in context: http://www.nabble.com/Possible-bug-in-activeM= Q4.1.0-with-Streams--tf3139553.html#a8702029 Sent from the ActiveMQ - User mailing list archive at Nabble.com.