📄 asimplebrowser.java
字号:
import java.io.*;
import java.net.*;
public class ASimpleBrowser{
public ASimpleBrowser(){
}
public static void main(String args[]){
byte urlBytes[]=new byte[20];
System.out.println("input the web site's name");
try{
System.in.read(urlBytes);
URL aURL=new URL(new String(urlBytes));
InputStream in=aURL.openStream();
int c;
while((c=in.read())!=-1){
System.out.write(c);
}
}
catch(MalformedURLException e1){
e1.printStackTrace();
}
catch(IOException e2){
e2.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -