📄 getcontent1.java
字号:
package com.unison.learn.http.wxx.main;
import java.io.*;
import java.net.*;
public class GetContent1 {
public static void main(String args[]) throws Exception {
URL url = new URL("http://youxi.zol.com.cn/pc/index4869.html");
URLConnection connection = url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(
connection.getInputStream()));
String line = null;
while ((line = in.readLine()) != null) {
System.out.println(new String(line.getBytes()));
}
in.close();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -