public class UrlTest1 {
public static void main(String[] args) throws Exception {
URL url = new URL("http://www.qq.com/");
URLConnection UrlConnection = url.openConnection();
InputStream is = UrlConnection.getInputStream();
FileOutputStream fos =  new FileOutputStream("F:\\fos.html");
//如果将F:\\fos.html改成F:/fos.html下载的网页就会出现乱码
byte bt[] = new byte[2048];
int length = 0;
while(-1!=(length = is.read(bt,0,bt.length))){
fos.write(bt,0,length);
}
is.close();
fos.close();
}
}
上面的注释就是我的问题,为什么会这样呢?