Package org.miaixz.bus.core.io.source
Class InflaterSource
java.lang.Object
org.miaixz.bus.core.io.source.InflaterSource
- All Implemented Interfaces:
Closeable,AutoCloseable,Source
使用DEFLATE 解压缩从另一个源读取的数据的源。
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
InflaterSource
-
-
Method Details
-
read
Description copied from interface:Source从中删除至少1个字节,最多为byteCount字节, 并将它们 附加到sink。返回读取的字节数,如果该源已耗尽,则返回-1- Specified by:
readin interfaceSource- Parameters:
sink- 缓冲byteCount- 长度大小- Returns:
- the long
- Throws:
IOException- 异常
-
refill
如果需要输入,则用压缩数据重新填充缓冲区。(并且仅在需要输入时才有效) 如果缓冲区需要输入但源已耗尽,则返回 true。- Throws:
IOException
-
timeout
Description copied from interface:Source返回此源的超时时间. -
close
Description copied from interface:Source关闭此源并释放此源持有的资源. 读取闭源是一个错误。多次关闭源是安全的.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceSource- Throws:
IOException- 异常
-