InputStream is=...;
byte[] buf=new byte[1024];
StringBuffer sb=new StringBuffer();
int length;
while((length=is.read(buf))!=-1){
sb.append(new String(buf,0,length));
}
System.out.println(sb.toString());
InputStream To StringBuffer
最新推荐文章于 2024-08-28 00:37:22 发布