if(log.isInfoEnabled()) log.info("fragmenting packet to " + (dest != null ? dest.toString() : "<all members>") +
if(log.isTraceEnabled()) log.trace("fragmenting packet to " + (dest != null ? dest.toString() : "<all members>") +
    private void fragment(Message msg) {        ObjectOutputStream oos;        byte[] buffer;        byte[] fragments[];        Event evt;        FragHeader hdr;        Message frag_msg=null;        Address dest=msg.getDest(), src=msg.getSrc();        long id=curr_id++; // used as seqnos        int num_frags=0;        try {            // Write message into a byte buffer and fragment it            bos.reset();            oos=new ObjectOutputStream(bos);            msg.writeExternal(oos);            oos.flush();            buffer=bos.toByteArray();            fragments=Util.fragmentBuffer(buffer, frag_size);            num_frags=fragments.length;                if(log.isInfoEnabled()) log.info("fragmenting packet to " + (dest != null ? dest.toString() : "<all members>") +                        " (size=" + buffer.length + ") into " + num_frags + " fragment(s) [frag_size=" + frag_size + "]");            for(int i=0; i < num_frags; i++) {                frag_msg=new Message(dest, src, fragments[i]);                hdr=new FragHeader(id, i, num_frags);                    if(log.isDebugEnabled()) log.debug("fragment's header is " + hdr);                frag_msg.putHeader(getName(), hdr);                evt=new Event(Event.MSG, frag_msg);                passDown(evt);            }        }        catch(Exception e) {            if(log.isErrorEnabled()) log.error("exception is " + e);        }    }