我用nio编了一个下载网页的程序:
Charset charset=Charset.forName("gb2312");            SocketChannel sc=SocketChannel.open(new java.net.InetSocketAddress("www.baidu.com", 80));
            System.out.println("has open port 80!");
            
            sc.configureBlocking(false);
    想要下载百度的index.html,求request怎么写?
    读文件的时候
       是这样读的吗(SocketChannel是sc,ByteBuffer是bb)?
   while(sc.read(bb)!=-1){
       System.out.println(charset.decode(bb));
   }