/** * Find out how many bytes of torrent data we've received, but are waiting for a thread to write * to disk. * * @return The number of bytes */ public int getAmountPending() { // Ask our torrent's VerifyingFolder object return _info.getVerifyingFolder().getAmountPending(); }
/** * Find out how much of this file we've verified as valid. * * @return The size of verified data, in bytes */ public long getAmountVerified() { // Ask the VerifyingFolder object how many verified blocks we have, and multiply that by the // block size to get bytes return _info.getVerifyingFolder().getVerifiedBlockSize(); }
/** * Get the number of bytes we downloaded but then discarded because they didn't hash correctly. * * @return The size in bytes */ public long getAmountLost() { // Ask the VerifyingFolder object return _info.getVerifyingFolder().getNumCorruptedBytes(); }
/** * Get the size of the portion of the file we've downloaded. If we download the same part of the * file twice, this number counts it just once. * * @return The size of data in bytes */ public long getAmountRead() { // Ask the VerifyingFolder object return _info.getVerifyingFolder().getBlockSize(); }