FileINputStream
FileInputStream,:This stream is not buffered. Most callers should wrap this stream with a
BufferedInputStream
.
这个流不缓冲,绝大多数情况下使用BufferedInputStream来包装
比如读取一个文件Flie sdCardDir=Environment.getExternalStorageDirectonry();
1)构造器
ileInputStream(File file)
Constructs a new FileInputStream that reads from file.
Constructs a new FileInputStream that reads from file.
FileInputStream(FileDescriptor fd)//可以补考虑
Constructs a new FileInputStream that reads from fd.
Constructs a new FileInputStream that reads from fd.
FileInputStream(String path)//根据文件路径获取对应的流
Equivalent to new FileInputStream(new File(path)).
Equivalent to new FileInputStream(new File(path)).
2)方法
int | available()
Returns an estimated number of bytes that can be read or skipped without blocking for more input.
| ||||||
void | close()
Closes this stream.
|