public class Deflate extends Object implements Closeable
| 构造器和说明 |
|---|
Deflate(InputStream source,
OutputStream target,
boolean nowrap)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
Deflate |
deflate(int level)
将普通数据流压缩
|
OutputStream |
getTarget()
获取目标流
|
Deflate |
inflate()
将压缩流解压到target中
|
static Deflate |
of(InputStream source,
OutputStream target,
boolean nowrap)
创建Deflate
|
public Deflate(InputStream source, OutputStream target, boolean nowrap)
source - 源流target - 目标流nowrap - true表示兼容Gzip压缩public static Deflate of(InputStream source, OutputStream target, boolean nowrap)
source - 源流target - 目标流nowrap - true表示兼容Gzip压缩public OutputStream getTarget()
public Deflate deflate(int level) throws IOException
level - 压缩级别,0~9IOExceptionpublic Deflate inflate() throws IOException
IOExceptionpublic void close()
close 在接口中 Closeableclose 在接口中 AutoCloseableCopyright © 2025 fossc. All rights reserved.