Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dalvik message - Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if an 8k buffer is required

Tags:

android

When I used BufferedInputStream and I specify a buffer size, Dalvik gives me this warning - Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if an 8k buffer is required.

But right now, my buffer size is already at 8k. What am I doing wrong?

like image 443
Arunabh Das Avatar asked Aug 17 '10 01:08

Arunabh Das


1 Answers

Just use:

BufferedReader br = new BufferedReader(new InputStreamReader(is), 8192);

instead of:

BufferedReader br = new BufferedReader(new InputStreamReader(is));

Note:

8192 (8k) is the size of the buffer in characters.

like image 137
Benny Neugebauer Avatar answered Oct 20 '22 00:10

Benny Neugebauer