?? url_to_url.java
字號:
// This method takes in a url and a prefix name and pulls that url across the// network, stores it in a local file named prefix// for now it assumes that the url is an image only ! import java.net.* ; import java.io.* ; import java.awt.* ; public class url_to_url { Image im ; public url_to_url(URL url,String prefix) { try { im = (Image)url.getContent(); } catch (IOException i) {} String www_path = System.getProperty("www-path"); String home_dir = System.getProperty("user.home"); String dir = home_dir + www_path ; System.out.println("web dir is this : " + dir); } public static void main(String[] argv) { URL test = null ; try { test = new URL("http://www.cs.wustl.edu/~rajeev/images/sand.jpg"); } catch ( MalformedURLException e) {} url_to_url t = new url_to_url(test,"root") ; } }
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -