Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 67329 invoked from network); 1 Sep 2004 16:07:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Sep 2004 16:07:33 -0000 Received: (qmail 85037 invoked by uid 500); 1 Sep 2004 16:07:11 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 84831 invoked by uid 500); 1 Sep 2004 16:07:08 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@geronimo.apache.org Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 84789 invoked by uid 99); 1 Sep 2004 16:07:08 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [65.39.132.26] (HELO activation.net) (65.39.132.26) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Sep 2004 09:07:06 -0700 Date: Wed, 1 Sep 2004 12:07:01 -0400 Message-Id: <200409011207.AA17957006@activation.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii From: "John Woolsey" Reply-To: To: Subject: RE: Socket Fun X-Mailer: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N The mearsurement of the bytearrayoutputstream is bytearray.length The other one is harder to come by. It is Socket.getInputStream.available() I believe. I don't have the code snippets here. Someone here suggested that it might be the EOF marker on the output stream. I believe I closed the stream but I will have to check. - bfn - JAW ---------- Original Message ---------------------------------- From: Alan Cabrera Reply-To: dev@geronimo.apache.org Date: Wed, 01 Sep 2004 08:51:50 -0400 >How do you perform your measurement? Can you provide a code snippet? > >> -----Original Message----- >> From: John Woolsey [mailto:jwoolsey@activation.net] >> Sent: Wednesday, September 01, 2004 8:37 AM >> To: dev@geronimo.apache.org >> Subject: Re: Socket Fun >> >> Good idea but I am using different ObjectOutputStreams. The first one >is >> to a byte array and the other is to a Socket Stream. The difference is >4 >> bytes 179 for the socket and 174. I am going to guess it is a length >> variable that is added to the byte array stream. I have gone to >> completely serializing outside the socket stream which works, but I >> thought the difference was interesting and worth bringing up. >> >> >> - bfn - JAW >> >> adam wrote: >> >> > Referencing by ObjectOutputStream. The second time you serialize >the >> > object out over the stream, ObjectOutputStream replaces it with a >> > reference back to the one it just sent. In one of the older JVMs, >> > this kept things that were serialized from being garbage collected, >> > although that's been fixed now. >> > >> > Adam >> > >> > John Woolsey wrote: >> > >> >> I am working on my RMI implementation and I was using the >> >> ObjectOutputStream. I made a function serialize that I used to find >> >> the length of the outbound data. Then I wrote the same object to a >> >> socket. The sizes where different ?!? Anyone have any idea why? >> >> >> >> >> >> - thanx - JAW >> >> >> > >> > >> > > > > >----------------------------------------------------------------- > Visit our Internet site at http://www.reuters.com > >Get closer to the financial markets with Reuters Messaging - for more >information and to register, visit http://www.reuters.com/messaging > >Any views expressed in this message are those of the individual >sender, except where the sender specifically states them to be >the views of Reuters Ltd. > >