⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 url.java

📁 J2EE第三章实例1
💻 JAVA
字号:
import java.io.*;
import java.net.*;

public class url {
	static FileOutputStream fos;
	static URL url;
	static InputStream is;
	static int i;

	public static void main(String args[]) {
		try {
			fos = new FileOutputStream("index.html");
			url = new URL("http://www.yahoo.com.cn/index.html");
			is  = url.openStream();

			i = is.read();
			while(i > 0) { 
				fos.write(i);
				i = is.read();
			}
		fos.close();
		is.close();
		}
		catch (IOException e) { 
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -