FileInputStream
来源:互联网 发布:软件测试的基本原理 编辑:程序博客网 时间:2024/04/29 05:56
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)方法intavailable()
Returns an estimated number of bytes that can be read or skipped without blocking for more input.
voidclose()Closes this stream.
intread()
Reads a single byte from this stream and returns it as an integer in the range from 0 to 255.
intread(byte[] buffer, int byteOffset, int byteCount)Reads up to
longskip(long byteCount)byteCount
bytes from this stream and stores them in the byte arraybuffer
starting at byteOffset
.Skips at most
n
bytes in this stream. 0 0
- fileinputstream
- FileInputStream
- FileInputStream
- FileInputStream
- FileInputStream
- FileInputStream
- FileInputStream
- FileInputStream
- fileinputstream
- FileInputStream
- FileInputStream
- FileInputStream
- FileInputStream&&FileOutputStream
- FileReader && FileInputStream
- FileInputStream类
- java fileinputstream
- java_io.FileInputStream
- 了解FileInputStream
- 网络通信过程 及TCP/UDP 面向连接?
- AngularJs
- 虚拟机装ubuntu网络相关问题
- 面向对象程序设计的思想的优点
- mysql学习笔记003
- FileInputStream
- '/'与'\'的区别于作用
- MONGO DB windows 安装
- 1503142303-蓝桥杯-历届试题 核桃的数量
- Linux常用命令
- Ext4使用中出现的bug
- 一个高性能无锁哈希表的实现
- 30种ps方法
- org.springframework.web.filter.CharacterEncodingFilter cannot be cast to javax.servlet.Filter报错