我的源代码:
InputStream is = ms.getInputStream();
OutputStream s = new FileOutputStream("d:/temp/demo.html");
byte b[] = new byte[1024];
while (is.read(b) != -1) {
os.write(b);
os.flush();
}
is.close();
os.close();
就这样读出来的内容最后会多出来一点,就是最后一点内容读了两次!