[填空题] 在下面程序的空白处,填上适当的内容。 Import java.io. *: import java.util. *; class BufferTest { public static v
[填空题] 在下面程序的空白处,填上适当的内容。 Import java.io. *: import java.util. *; class BufferTest { public static void main(String args[])throws IOExeeption { FileOutputStream unbuf=new FileoutputStream("test.one"); BufferedOutputStream bur=new ______ (new FileOutputStream("test.two")); System.out.println("write file unbuffered:"+time(unbuf)+"ms"); System.out.println("write file buffered:"+time(buf)+"ms"); } static int time(OutputStream os)throws IOException { Date then=new Date(); for(int i=0;i<50000;i++)os.write(1); os.close(); return(int)((new Date()).getTime()-then.getTime()); } }
参考答案: