标签:ons += tostring 字符串 比较 uil app append input
将写内容过程比较好的内容做个记录,下面的资料是关于Android从 HttpResponse (或者InputStream) 获取字符串内容的内容,应该对码农有些好处。BufferedReader rd = new BufferedReader(new InputStreamReader(is));
while ((line = rd.readLine()) != null) {
total.append(line);
}
return total;
}
private String inputStreamToString(InputStream is) {
String s = "";
String line = "";
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
while ((line = rd.readLine()) != null) { s += line; }
return s;
}
Android从 HttpResponse (或者InputStream) 获取字符串内容的代码
标签:ons += tostring 字符串 比较 uil app append input
原文地址:http://blog.51cto.com/14131177/2329948