class DownloadTransferListener implements TransferListener {

	@Override
	public void bytesTransfered(String file, long bytesTransfered) {
		totalBytes += bytesTransfered;

		if (totalBytes % 1024 == 0) {
			long sizeInMbs = FileUtils.byteCountToDisplaySize(totalBytes);
			LOGGER.trace("Transfered '{}': {} Mb", file, sizeInMbs);

			if (session == null) {
				initSession(file);
			}
			session.setTransferredInMbs(sizeInMbs);
		}
	}

}