中国大学MOOC: 语句BufferedReader in = new BufferedReader( new InputStreamReader( clientSocket.getInputStream())),从网络读入的是:
举一反三
- 在java中,以下代码()正确地创建了一个InputStreamReader类型的对象(选一项) A: new InputStreamReader(new FileInputStream("1.dat")); B: new InputStreamReader(new FileReader("1.dat")); C: new InputStreamReader(new BufferedReader("1.dat")); D: new InputStreamReader("1.dat");
- 要读一个较大的文件,下列创建对象的方法中哪个是最合适的?( ) A: new FileInputStream(“myfile.dat”); B: new InputStreamReader(new FileInputStream(“myfile.dat”)); C: new BufferedReader(new InputStreamReader(new FileInputStream(“myfile.dat”); D: new RandomAccessFile raf=new RandomAccessFile(new File(“myfile.dat”,”rw”));
- 下列语句错误的是:( ) A: ServerSocket svrsoc= new ServerSocket(8000); B: URL urlBase=new URL(“http://www. zjut.edu.cn/”) ; C: File inFile = new File(“C:/ test.txt”); D: BufferedReader br = new BufferedReader(“C:/ test.txt”);
- 已知BufferedReader br=new BufferedReader(f),则“br.readLine()”返回对象的类型是
- 下面代码的空白处可以填写的类是()。 try{ BufferedReader br=new BufferedReader(fr); } catch(IOException e){} catch( e2){}