public final class GzipSource extends Object implements Source
| Constructor and Description |
|---|
GzipSource(Source source) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
关闭此源并释放此源持有的资源.
|
long |
read(Buffer sink,
long byteCount)
从中删除至少1个字节,最多为
byteCount字节, 并将它们
附加到sink。返回读取的字节数,如果该源已耗尽,则返回-1 |
Timeout |
timeout()
返回此源的超时时间.
|
public GzipSource(Source source)
public long read(Buffer sink, long byteCount) throws IOException
SourcebyteCount字节, 并将它们
附加到sink。返回读取的字节数,如果该源已耗尽,则返回-1read in interface Sourcesink - 缓冲byteCount - 长度大小IOException - IOException IOException.public void close()
throws IOException
Sourceclose in interface Closeableclose in interface AutoCloseableclose in interface SourceIOException - IOException IOException.Copyright © 2020. All rights reserved.