Class BufferedInputStreamDataSupplier
java.lang.Object
cool.scx.io.BufferedInputStreamDataSupplier
- All Implemented Interfaces:
DataSupplier
BufferedInputStreamDataSupplier
和
InputStreamDataSupplier 性能相反
1, 当大部分时候读取的数据长度等于 bufferLength 的时候, 性能会差一点 因为多了一次复制
2, 当大部分时候读取的数据长度小于 bufferLength 的时候, 性能会好一点 因为只会创建一个较小的数组并复制数据- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
ConstructorsConstructorDescriptionBufferedInputStreamDataSupplier(InputStream inputStream) BufferedInputStreamDataSupplier(InputStream inputStream, int bufferLength) -
Method Summary
-
Constructor Details
-
BufferedInputStreamDataSupplier
-
BufferedInputStreamDataSupplier
-
-
Method Details
-
get
Description copied from interface:DataSupplier获取数据 如果没有数据请返回 null- Specified by:
getin interfaceDataSupplier- Returns:
- 数据节点 或 null
-