对于FileInputStream和FileOutputStream类,下面哪个方法不会产生IOException异常()A、二者的构造函数B、read()C、close()D、write()
对于FileInputStream和FileOutputStream类,下面哪个方法不会产生IOException异常()
- A、二者的构造函数
- B、read()
- C、close()
- D、write()
相关考题:
下列InputStream构造方法正确的是()。 A、InputStream in=new FileReader(“file.txt”)B、InputStream in=new FileInputStream(“file.txt”)C、InputStream in=new InputStreamFileReader (“file.txt”,“read”)D、FileInputStream in=new FileReader(new File(“file.txt”))
下列( )不是FilterlnputStream的子类。A.CheckedInputStreamB.BufferedInputStreamC.PushbackInputStreamD.FileInputStream
下列哪个选项不是FilterInputStream的子类?A.CheckedInputStreamB.BufferedInputStreamC.PushbackInputStreamD.FileInputStream
在读字符文件emplyee.dat时,使用该文件作为参数的类是( )。A.BufferReaderB.DataInputStreamC.DataOutputStreamD.FileInputStream
Java中处理压缩流的抽象类是A.InputStream和OutputStreamB.Reader和WriterC.InflaterInputStream和DeflaterOutputStreamD.FileInputStream和FileOutputStream
从对象流中读取对象,请在下面横线处填写代码完成此程序。import java.util. *;import java. io. *;public class UnSerializeDate{date d = null;UnSerializeDate ( ){try{FileInputStream f1 = new FileInputStream("date.ser");d = (Date) s. readobject ();f1,close();}catch (Exceptin e){e. printStackTrace ();}}public static main(String args [] ){System.out.println("The date read is: "+ a.d.toString());}}
要从文件“file.dar”文件中读出第10个字节到变量C中,下列哪个方法适合 ( )A.FileInputStream in=new FileInputStream("file.dar");in.skip9.;int c=in.read();B.FileInputStream in=new FileInputStream("file.dar");in.skip10.;int c=in.read();C.FileInputStream in=new FileInpmStream("file.dar");int c=in.read();D.Random AccessFile in=new RandomAceessFile("file.dar");in.skip9.;int c=in.readByte
下列代码实现从文件file.dat中读出第5个字节到变量c中,横线处应该填入下列项中的______。 import java.io.*; public class exl5 { public static void main(String[] args) { try System.out.println((char)c); catch(Exception e) { e.printStackTrace(); } } }A.FileInputStream in = new FileInputStream("chl/file.dat"); in.skip(4); int c = in.read();B.FileInputStream in = new FileInputStream("chl/file.dat"); in.skip(5); int c = in.read();C.Fi2eInputStream in = new FileInputStream("file.dat"); int c = in.read();D.RandomAccessFile in = new RandomAccessFile ("chi/file. dat "); in.skip (4); int c = in.readByte();
对于FileInputStream类,下列哪一项是不正确的()A、从InputStream类继承B、不支持InputStream的有些方法C、不适合读取字符文件,适合读取字节文件D、能实现文件的倒序读取
要从文件" file.dat"文件中读出第10个字节到变量C中,下列哪个方法适合? ()A、 FileInputStream in=new FileInputStream("file.dat"); in.skip(9); int c=in.read();B、 FileInputStream in=new FileInputStream("file.dat"); in.skip(10); int c=in.read();C、 FileInputStream in=new FileInputStream("file.dat"); int c=in.read();D、 RandomAccessFile in=new RandomAccessFile("file.dat"); in.skip(9); int c=in.readByte();
以下哪两个流对象可以实现任意类型文件的成功复制()字节流。A、 FileReader 和 FileWriterB、 FileInputStream和FileOutputStreamC、 BufferedReader和 BufferedWriterD、 InputSteamReader和OutputStreamWriter
下列属于文件输入输出类的是()A、 FileInputStream和FileOutputStreamB、 BufferInputStream和BufferOutputStreamC、 PipedInputStream和PipedOutputStreamD、 以上都是
要从文件"file.dat"中读出第10个字节到变量c中,下列哪个方法适合?()A、FileInputStream in=new FileInputStream("file.dat");in.skip(9);intc=in.read()B、FileInputStream in=new FileInputStream("file.dat");in.skip(10);intc=in.read()C、FileInputStream in=new FileInputStream("file.dat");intc=in.read()D、RandomAccessFile in=new RandomAccessFile("file.dat");in.skip(9);intc=in.readByte()
Which two create an InputStream and open file the “file.txt” for reading? ()A、 InputStream in=new FileReader(“file.txt”);B、 InputStream in=new FileInputStream(“file.txt”);C、 InputStream in=new InputStreamFileReader (“file.txt”, “read”);D、 FileInputStream in=new FileReader(new File(“file.txt”));E、 FileInputStream in=new FileInputStream(new File(“file.txt”));
单选题以下哪两个流对象可以实现任意类型文件的成功复制()字节流。A FileReader 和 FileWriterB FileInputStream和FileOutputStreamC BufferedReader和 BufferedWriterD InputSteamReader和OutputStreamWriter
多选题Which two create an InputStream and open file the “file.txt” for reading? ()AInputStream in=new FileReader(“file.txt”);BInputStream in=new FileInputStream(“file.txt”);CInputStream in=new InputStreamFileReader (“file.txt”, “read”);DFileInputStream in=new FileReader(new File(“file.txt”));EFileInputStream in=new FileInputStream(new File(“file.txt”));
单选题对于FileInputStream类,下列哪一项是不正确的()A从InputStream类继承B不支持InputStream的有些方法C不适合读取字符文件,适合读取字节文件D能实现文件的倒序读取
单选题要从文件" file.dat"文件中读出第10个字节到变量C中,下列哪个方法适合? ()A FileInputStream in=new FileInputStream(file.dat); in.skip(9); int c=in.read();B FileInputStream in=new FileInputStream(file.dat); in.skip(10); int c=in.read();C FileInputStream in=new FileInputStream(file.dat); int c=in.read();D RandomAccessFile in=new RandomAccessFile(file.dat); in.skip(9); int c=in.readByte();
单选题要从文件"file.dat"中读出第10个字节到变量c中,下列哪个方法适合?()AFileInputStream in=new FileInputStream(file.dat);in.skip(9);intc=in.read()BFileInputStream in=new FileInputStream(file.dat);in.skip(10);intc=in.read()CFileInputStream in=new FileInputStream(file.dat);intc=in.read()DRandomAccessFile in=new RandomAccessFile(file.dat);in.skip(9);intc=in.readByte()
单选题在J2ee中,以下各项中,()正确阐述了创建InputStreamReader的方式。Anew InputStreamReader(new FileInputStream(data));Bnew InputStreamReader(new FileReaderdata));Cnew InputStreamReader(new BufferedReader(data));Dnew FileInputStream(data)
单选题对于FileInputStream和FileOutputStream类,下面哪个方法不会产生IOException异常()A二者的构造函数Bread()Cclose()Dwrite()
单选题下列属于文件输入输出类的是()A FileInputStream和FileOutputStreamB BufferInputStream和BufferOutputStreamC PipedInputStream和PipedOutputStreamD 以上都是