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

📄 asimplebrowser.java

📁 一个简单的浏览器
💻 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 + -