import java.io.*;
import java.net.*;
public class getWebContent {
   public   static   String   getWebCon(String   domain){
         System.out.println("开始读取内容...("+domain+")");
         StringBuffer   sb   =   new   StringBuffer();
          try{
              URL   url   =   new   URL(domain);
              BufferedReader   in   =
              new   BufferedReader(new   InputStreamReader(url.openStream()));
              String   line;
              while((line   =   in.readLine())   !=   null){
                  sb.append(line);
              }
             in.close();
          }catch(Exception   e)   {   //   Report   any   errors   that   arise
                sb.append(e.toString());
                System.err.println(e);
                System.err.println("Usage:   java   HttpClient   <URL>   [<filename>]");
             }
   return   sb.toString();
       }
   public static void main(String args[]){
   getWebCon("www.google.com");
   }
}
运行之后总是显示
run:
java.net.MalformedURLException: no protocol: www.google.com               * 
 开始读取内容...(www.google.com)
Usage:   java   HttpClient   <URL>   [<filename>]                           *
 成功生成(总时间:1 秒)我打星号标注的是红颜色的,要怎么样才能去掉呢?还有我就是想获取网页的源代码,这个该怎么修改呀?