Reputation: 3806
I'm using an AsynkTast
to download a set of CSV lines and want keep track of how many bytes that has been read in total.
while ((string = bufferedReader.readLine()) != null)
{
bytesRead += ?;
}
How would I access the line total bytes?
I'm sorry if this question is a duplicate but I can only seem to find questions where the answer is in relation to an OutputStream
.
Upvotes: 4
Views: 2728
Reputation: 7435
try:
while ((string = br.readLine()) != null)
{
bytesRead += (string.getBytes().length);
}
Upvotes: 1