public class Deflate extends Object implements Closeable
Constructor and Description |
---|
Deflate(InputStream source,
OutputStream target,
boolean nowrap)
构造
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
Deflate |
deflater(int level)
将普通数据流压缩
|
OutputStream |
getTarget()
获取目标流
|
Deflate |
inflater()
将压缩流解压到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 deflater(int level)
level
- 压缩级别,0~9public Deflate inflater()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2024. All rights reserved.