if(log.isInfoEnabled()) log.info("\nsending msgs:\n" + dumpMessages(msgs));
if(log.isDebugEnabled()) log.debug("\nsending msgs:\n" + dumpMessages(msgs));
        void bundleAndSend() {            Map.Entry            entry;            IpAddress            dest;            ObjectOutputStream   out;            InetAddress          addr;            int                  port;            byte[]               data;            List                 l;                if(log.isInfoEnabled()) log.info("\nsending msgs:\n" + dumpMessages(msgs));            synchronized(msgs) {                stopTimer();                if(msgs.size() == 0)                    return;                for(Iterator it=msgs.entrySet().iterator(); it.hasNext();) {                    entry=(Map.Entry)it.next();                    dest=(IpAddress)entry.getKey();                    addr=dest.getIpAddress();                    port=dest.getPort();                    l=(List)entry.getValue();                    try {                        out_stream.reset();                        // BufferedOutputStream bos=new BufferedOutputStream(out_stream);                        out_stream.write(Version.version_id, 0, Version.version_id.length); // write the version                        //bos.write(Version.version_id, 0, Version.version_id.length); // write the version                        out=new ObjectOutputStream(out_stream);                        // out=new ObjectOutputStream(bos);                        l.writeExternal(out);                        out.close(); // needed if out buffers its output to out_stream                        data=out_stream.toByteArray();                        doSend(data, addr, port);                    }                    catch(IOException e) {                        if(log.isErrorEnabled()) log.error("exception sending msg (to dest=" + dest + "): " + e);                    }                }                msgs.clear();            }        }