public static void main(String[] args) throws IOException {
long currentTimeMillis = System.currentTimeMillis();
URL url=
new URL ("http://img.resds.com/sysimg/Register11.html");
InputStream is=url.openStream();
BufferedReader br=new BufferedReader(new InputStreamReader (is));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("E:/upload/email/1.html"),"utf-8"));
String line = null;
while((line=br.readLine())!=null){
bw.write(line);
bw.newLine();
bw.flush();
}
bw.close();
br.close();
System.err.println(currentTimeMillis);
}
读取网上的图片到流中
最新推荐文章于 2024-08-14 23:12:09 发布