读取网上的图片到流中
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);}