配置文件自增

CLM_OPT_INFO_S String path = request.getContextPath(); String address = request.getRemoteAddr(); int port = request.getServerPort(); URL url; try { url = new URL("http://"+address+":"+String.valueOf(port)+path+"/506595.jpg"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); FilterInputStream fis = (FilterInputStream)con.getInputStream(); byte[] by = new byte[102400]; File file = new File("C:\\test1.jpg"); FileOutputStream fos = new FileOutputStream(file); while(fis.available() > 0) { // fis.read(by); int i = fis.read(); fos.write(i); } fis.close(); // fos.write(by); fos.close(); }

你可能感兴趣的:(C++,c,C#)