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

📄 urlreader.java

📁 利用java写的聊天工具所实现的部分功能
💻 JAVA
字号:
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
import java.net.URL;
import java.net.MalformedURLException;
public class URLReader{
	public static void main(String args[]){
		//System.setProperty("http.proxyHost","192.168.1.1");
		//System.setProperty("http.proxyPort","11080");
		try{
			URL tirc = new URL("http://www.google.cn/");
			BufferedReader in = new BufferedReader(new 
				InputStreamReader(tirc.openStream()));
			String s;
			while((s = in.readLine())!=null)
				System.out.println(s);
			in.close();	
		}catch(MalformedURLException e) {
			System.out.println(e);	
		}catch(IOException e){
			System.out.println(e);
		}	
    }
}

⌨️ 快捷键说明

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