void (TransferEvent event) { checkCanceled(); TransferResource r = event.getResource(); long totalLength = r.getContentLength(); String sizeInfo; if (totalLength <= 0) { sizeInfo = StringUtilRt.formatFileSize(event.getTransferredBytes()) + " / ?"; } else { sizeInfo = StringUtilRt.formatFileSize(event.getTransferredBytes()) + " / " + StringUtilRt.formatFileSize(totalLength); } myIndicator.debug(formatResourceName(event) + " (" + sizeInfo + ')'); if (totalLength > 0) { myIndicator.debug(String.valueOf(Math.floor(100 * (double)event.getTransferredBytes() / totalLength)) + "%"); } }