单选题DataInputStream与DataOutputStream的特点()A读写数据时与具体的机器无关B读写数据时与具体的机器有关C读数据时与机器有关,而写数据时与机器无关D读数据时与机器无关,而写数据时与机器有关
单选题
DataInputStream与DataOutputStream的特点()
A
读写数据时与具体的机器无关
B
读写数据时与具体的机器有关
C
读数据时与机器有关,而写数据时与机器无关
D
读数据时与机器无关,而写数据时与机器有关
参考解析
解析:
暂无解析
相关考题:
在J2EE中,某一java程序中有如下代码:DataInputStream din=new DataInputStream(new BufferedInputStream(new FileInputStream("employee.dat")));System.out.print(din.readByte());假设在employee.dat文件中只有如下一段字符:abcdefg。则:System.out在屏幕上打印()。A.aB.bC.97D.98
阅读下面程序import java.io.*;public class ByteStream Test{public static void main(String[] a){int[] myArray = {10,20.30,40};try{DataOutputStream dos = new DataOutputStream(new _________________( " ints.dat " ));for (int i=0;imyArray.length;i++)dos.writeInt(myArray[i] ) ;dos.close();S ystem.out.println( " Have written binary file ints.dat " );}catch (IOException ioc){System.out.println( " IO Exception " );}}}为保证程序正确运行,在程序中下划线处应填入的代码是A)FileOutputStreamB)ByteArrayOutputStreamC)BufferedOutputStreamD)FileWriter
Java 类库中,将信息写入内存的类是A ) java.io.FileOutputStreamB ) java.io.ByteArrayOutputStreamC ) java.io.BufferedOutputStreamD ) java.io.DataOutputStream
请完成下列Java程序:实现打印出自己的源文件的功能。注意:请勿改动main()主方法和其他已有语句内容,仅在下划线处填入适当的语句。import java.io.*;import java.util.StringTokenizer;public class ex27_2{public static void main(String args[])throws IOException{FileInputStream fis=new FileInputStream("ex27_2.java");DataInputStream dis=new DataInputStream(fis);String str=null;while(true){__________________;if(str==null){__________________;}StringTokenizer st=new StringTokenizer(str);while(st.hasMoreTokens()){System.out.print(st.nextToken()+ " " );}System.out.println();}}}
阅读下面写文件的程序 import java. io. *; public class WriteFile{ public static void main(String[]A) { int[]myArray={10,20,30,40}; try{ FileOutputStream f=new FlieOutStream("ints. dat"); DataOutputStream______=new DataOutputStream(f); for(int i=0; i<myArray. length; i ++) dos. writeInt(myArray[i]); dos. close(); System. out. prinfln("Have written binary file ints. dat"); } catch(IOException ioe){ System. out. println("IO Exception"); } } 在程序下画线处填入的正确选项是A.myArrayB.dosC.ioeD.ints
Java类库中,将信息写入内存的类是( )。A.java.io.FileOutputStreamB.java.io.ByteArrayOutputStreamC.java.io.BufferedOutputStreamD.j ava.io.DataOutputStream
在J2EE中,下面代码中,()不会编译错误。 A、File f = new File("/","autoexec.bat");B、DataInputStream din = new DataInputStream(new FileInputStream("autoexec.bat"));C、InputStreamReader in = new InputStreamReader(System.in);D、OutputStreamWriter out = new OutputStreamWriter(System.in);
在J2EE中,在提供名为sock的套接字实例的前提下,为了后去通过套接字进行通信的输出流,你可以编写() A、sock.accept()B、sock.getDataOutputStreamC、sock.getOutputStreamD、new DataOutputStream(sock)
Which constructs a DataOutputStream?() A、 New dataInputStream(“in.txt”);B、 New dataInputStream(new file(“in.txt”));C、 New dataInputStream(new writer(“in.txt”));D、 New dataInputStream(new FileWriter(“in.txt”));E、 New dataInputStream(new InputStream(“in.txt”));F、 New dataInputStream(new FileInputStream(“in.txt”));
DataInputStream与DataOutputStream的特点()A、读写数据时与具体的机器无关B、读写数据时与具体的机器有关C、读数据时与机器有关,而写数据时与机器无关D、读数据时与机器无关,而写数据时与机器有关
如果我们想实现“先把要写入文件的数据先缓存到内存中,再把缓存中的数据写入文件中”的功能时,则需要使用下列哪个类?()A、 FileReaderB、 OutputStreamC、 FilterOutputStreamD、 DataOutputStream
下面哪些是FilterInputStream的直接子类()。A、BufferedInputStreamB、InputStreamReaderC、ObjectInputStreamD、ByteArrayInputStreamE、DataInputStream
Which constructs a DataOutputStream?()A、 New dataOutputStream(“out.txt”);B、 New dataOutputStream(new file(“out.txt”));C、 New dataOutputStream(new writer(“out.txt”));D、 New dataOutputStream(new FileWriter(“out.txt”));E、 New dataOutputStream(new OutputStream(“out.txt”));F、 New dataOutputStream(new FileOutputStream(“out.txt”));
单选题Which constructs a DataOutputStream?()A New dataOutputStream(“out.txt”);B New dataOutputStream(new file(“out.txt”));C New dataOutputStream(new writer(“out.txt”));D New dataOutputStream(new FileWriter(“out.txt”));E New dataOutputStream(new OutputStream(“out.txt”));F New dataOutputStream(new FileOutputStream(“out.txt”));
单选题在下列程序的空白处,应填入的正确选项是( )。import java.io.*;public class writeInt{public static void main(String[] args){int[] myArray={10,20,30,40};try{ DataOutputStream dos=new DataOutputStream(new FileOutputStream("ints.dat")); for(int i=0;i dos.writeInt(myArray[i]); dos.close(); System.out.println("Have written binary file ints.dat");}}catch(IOException ioe){ System.out.println("IOException");}}}Astart()Bclose()Cread()Dwrite()
单选题在j2ee中,某一Java程序中有如下代码: DataInputStream din =new DataInputStream(new BufferedInputStream(new FileInputStream("employee.dat"))); System.out.print(din.readByte()); 假设在employee.dat文件中只有如下一段字符:abcdefg.则:System.out在屏幕上打印()A aB bC97D98
多选题在J2EE中,下面代码中,()不会编译错误。AFile f = new File(/,autoexec.bat);BDataInputStream din = new DataInputStream(new FileInputStream(autoexec.bat));CInputStreamReader in = new InputStreamReader(System.in);DOutputStreamWriter out = new OutputStreamWriter(System.in);
单选题在J2EE中,在提供名为sock的套接字实例的前提下,为了后去通过套接字进行通信的输出流,你可以编写()Asock.accept()Bsock.getDataOutputStreamCsock.getOutputStreamDnew DataOutputStream(sock)
单选题Which constructs a DataOutputStream?()A New dataInputStream(“in.txt”);B New dataInputStream(new file(“in.txt”));C New dataInputStream(new writer(“in.txt”));D New dataInputStream(new FileWriter(“in.txt”));E New dataInputStream(new InputStream(“in.txt”));F New dataInputStream(new FileInputStream(“in.txt”));
单选题What writes the text “ ” to the end of the file “file.txt”?()A OutputStream out= new FileOutputStream (“file.txt”); Out.writeBytes (“ /n”);B OutputStream os= new FileOutputStream (“file.txt”, true); DataOutputStream out = new DataOutputStream(os); out.writeBytes (“ /n”);C OutputStream os= new FileOutputStream (“file.txt”); DataOutputStream out = new DataOutputStream(os); out.writeBytes (“ /n”);D OutputStream os= new OutputStream (“file.txt”, true); DataOutputStream out = new DataOutputStream(os); out.writeBytes (“ /n”);
单选题Java类库中,将信息写入内存的类是( )。Ajava.io.FileOutputStreamBjava.io.ByteArrayOutputStreamCjava.io.BufferedOutputStreamDjava.io.DataOutputStream
单选题如果我们想实现“先把要写入文件的数据先缓存到内存中,再把缓存中的数据写入文件中”的功能时,则需要使用下列哪个类?()A FileReaderB OutputStreamC FilterOutputStreamD DataOutputStream