private void transferData(RawPacket[] pkts)
    {
        for (int i = 0; i < pkts.length; i++)
        {
            RawPacket pkt = pkts[i];
            pkts[i] = null;
            if (pkt != null)
            {
                if (pkt.isInvalid())
                {
                    /*
                     * Return pkt to the pool because it is invalid and,
                     * consequently, will not be made available to reading.
                     */
                    poolRawPacket(pkt);
                }
                else
                {
                    RawPacket oldPkt;
                    synchronized (pktSyncRoot)
                    {
                        oldPkt = this.pkt;
                        this.pkt = pkt;
                    }
                    if (oldPkt != null)
                    {
                        /*
                         * Return oldPkt to the pool because it was made
                         * available to reading and it was not read.
                         */
                        poolRawPacket(oldPkt);
                    }
                    if (transferHandler != null && !closed)
                    {
                        try
                        {
                            transferHandler.transferData(this);
                        }
                        catch (Throwable t)
                        {
                            // XXX We cannot allow transferHandler to kill us.
                            if (t instanceof InterruptedException)
                            {
                                Thread.currentThread().interrupt();
                            }
                            else if (t instanceof ThreadDeath)
                            {
                                throw (ThreadDeath) t;
                            }
                            else
                            {
                                logger.warn(
                                    "An RTP packet may have not been fully"
                                        + " handled.",
                                    t);
                            }
                        }
                    }
                }
            }
        }
    }
private void transferData(RawPacket[] pkts)
    {
        for (int i = 0; i < pkts.length; i++)
        {
            RawPacket pkt = pkts[i];
            pkts[i] = null;
            if (pkt != null)
            {
                if (pkt.isInvalid())
                {
                   
                    poolRawPacket(pkt);
                }
                else
                {
                    RawPacket oldPkt;
                    synchronized (pktSyncRoot)
                    {
                        oldPkt = this.pkt;
                        this.pkt = pkt;
                    }
                    if (oldPkt != null)
                    {
                       
                        poolRawPacket(oldPkt);
                    }
                    if (transferHandler != null && !closed)
                    {
                        try
                        {
                            transferHandler.transferData(this);
                        }
                        catch (Throwable t)
                        {
                           
                            if (t instanceof InterruptedException)
                            {
                                Thread.currentThread().interrupt();
                            }
                            else if (t instanceof ThreadDeath)
                            {
                                throw (ThreadDeath) t;
                            }
                            else
                            {
                                logger.warn(
                                    "An RTP packet may have not been fully"
                                        + " handled.",
                                    t);
                            }
                        }
                    }
                }
            }
        }
    }
private void transferdata(rawpacket[] pkts) { for (int i = 0; i < pkts.length; i++) { rawpacket pkt = pkts[i]; pkts[i] = null; if (pkt != null) { if (pkt.isinvalid()) { poolrawpacket(pkt); } else { rawpacket oldpkt; synchronized (pktsyncroot) { oldpkt = this.pkt; this.pkt = pkt; } if (oldpkt != null) { poolrawpacket(oldpkt); } if (transferhandler != null && !closed) { try { transferhandler.transferdata(this); } catch (throwable t) { if (t instanceof interruptedexception) { thread.currentthread().interrupt(); } else if (t instanceof threaddeath) { throw (threaddeath) t; } else { logger.warn( "an rtp packet may have not been fully" + " handled.", t); } } } } } } }