protected void update(long b) {
        byteCount += b;
        
        int newPercentage = getNewPercentage(byteCount, bytesPerPercent);
        double speedNew   = getTransferSpeed();
        
        if (newPercentage > percentProgress) {
            if (expectedSize == -1)
                percentProgress = newPercentage;
            else
                percentProgress = newPercentage;
            
            for (TransferListener t : tl)
                t.percentageChanged(percentProgress, eventSource);
        }
        if (!(Math.abs(speedNew - transferRate) < .0000001)) {
            for (TransferListener t : tl)
                t.transferRateChanged(speedNew, eventSource);
            transferRate = speedNew;
        }       
        if (b != expectedSize) {
            double rTime = (expectedSize - byteCount) / 1024.0F / speedNew;
            for (TransferListener t : tl)             
                t.remainingTimeChanged((int) rTime, eventSource);           
        } else {
            for (TransferListener t : tl) 
                t.remainingTimeChanged(0, eventSource);
        }
        
        for (TransferListener t : tl) 
            t.retrievedAmountChanged(getByteCount(), expectedSize, eventSource);
    }