[置顶] Android “It would be better to be explicit if an 8k-char buffer is required”

    在Adnroid开发中,新建BufferedReader时使用如下代码回报错,

 InputStreamReader isr = new InputStreamReader(is, "utf-8");  
 BufferedReader br = new BufferedReader(isr);
    将代码修改为如下代码即可解决问题:

 InputStreamReader isr = new InputStreamReader(is, "utf-8");  
 BufferedReader br = new BufferedReader(isr, 8 * 1024);



你可能感兴趣的:(android,bufferedreader,错误处理)