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 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());