![](https://static.youtibao.com/asksite/comm/h5/images/m_q_title.png)
FileInputStream流的int read()方法从源中试图读取b.length个字节到字节数组b中,返回实际读取的字节数目。如果到达文件的末尾,则返回-1
![](https://static.youtibao.com/asksite/comm/h5/images/solist_ts.png)
A.从文件fd中读取长度不超过n个字节的数据送入buffer指向的内存区域
B.从文件fd中读取长度不超过n-1个字节的数据送入buffer指向的内存区域
C.从文件fd中读取长度不超过n个字符送入buffer指向的内存区域
D.从文件fd中读取长度不超过n-1个字符送入buffer指向的内存区域
A.创建 FileInputStream 对象是为了读取硬盘上的文件
B.创建 FileInputStream 对象时,如果硬盘上对应的文件不存在,则抛出一个异常
C.利用 FileInputStream 对象可以创建文件
D.FileInputStream 对象读取文件时,只能读取文本文件
A.4个宁节
B.5个字节
C.6个字节
D.7个字节
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"); intc=in.read();
D、RandomAccessFile in=new RandomAccessFile("file.dat"); in.skip(9);int c=in.readByte();
A.4个宁节
B.5个字节
C.6个字节
D.7个字节
A.fileObject.readline()方法用于从文件读取整行,包括“/n”字符
B.fileObject.write()函数用于打开/创建一个文件
C.fileObiect.read()方法用于从文件读取指定的字节数,如果未给定参数或参数为负则读取所有
D.fileObject.readlines()方法用于读取所有行(直到结束符EOF)并返回列表,该列表可以由Python的for…in…结构进行处理