public class CompressorStream extends CompressionOutputStream
| 限定符和类型 | 字段和说明 |
|---|---|
protected byte[] |
buffer |
protected boolean |
closed |
protected Compressor |
compressor |
out| 限定符 | 构造器和说明 |
|---|---|
protected |
CompressorStream(OutputStream out)
Allow derived classes to directly set the underlying stream.
|
|
CompressorStream(OutputStream out,
Compressor compressor) |
|
CompressorStream(OutputStream out,
Compressor compressor,
int bufferSize) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
protected void |
compress() |
void |
finish()
Finishes writing compressed data to the output stream
without closing the underlying stream.
|
void |
resetState()
Reset the compression to the initial state.
|
void |
write(byte[] b,
int off,
int len)
Write compressed bytes to the stream.
|
void |
write(int b) |
flushwriteprotected Compressor compressor
protected byte[] buffer
protected boolean closed
public CompressorStream(OutputStream out, Compressor compressor, int bufferSize)
public CompressorStream(OutputStream out, Compressor compressor)
protected CompressorStream(OutputStream out)
out - Underlying output stream.public void write(byte[] b,
int off,
int len)
throws IOException
CompressionOutputStreamwrite 在类中 CompressionOutputStreamIOExceptionprotected void compress()
throws IOException
IOExceptionpublic void finish()
throws IOException
CompressionOutputStreamfinish 在类中 CompressionOutputStreamIOExceptionpublic void resetState()
throws IOException
CompressionOutputStreamresetState 在类中 CompressionOutputStreamIOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 CompressionOutputStreamIOExceptionpublic void write(int b)
throws IOException
write 在类中 OutputStreamIOExceptionCopyright © 2009 The Apache Software Foundation