BufferedReader, how many bytes are read?

I am using AsynkTast to load a set of CSV strings and want to keep track of how many bytes have been read in total.

 while ((string = bufferedReader.readLine()) != null) { bytesRead += ?; } 

How do I access shared bytes?

Sorry if this question is a duplicate, but I can only find answers to questions regarding the answer to OutputStream .

+4
source share
1 answer

to try:

 while ((string = br.readLine()) != null) { bytesRead += (string.getBytes().length); } 
+1
source

Source: https://habr.com/ru/post/1440272/


All Articles