@Internal public abstract class StreamCompressionDecorator extends Object implements Serializable
| 构造器和说明 |
|---|
StreamCompressionDecorator() |
| 限定符和类型 | 方法和说明 |
|---|---|
InputStream |
decorateWithCompression(InputStream stream)
IMPORTANT: For streams returned by this method,
InputStream.close() is not propagated
to the inner stream. |
protected abstract InputStream |
decorateWithCompression(NonClosingInputStreamDecorator stream) |
protected abstract OutputStream |
decorateWithCompression(NonClosingOutputStreamDecorator stream) |
OutputStream |
decorateWithCompression(OutputStream stream)
Decorates the stream by wrapping it into a stream that applies a compression.
|
public final OutputStream decorateWithCompression(OutputStream stream) throws IOException
IMPORTANT: For streams returned by this method, OutputStream.close() is not
propagated to the inner stream. The inner stream must be closed separately.
stream - the stream to decorate.IOExceptionpublic final InputStream decorateWithCompression(InputStream stream) throws IOException
InputStream.close() is not propagated
to the inner stream. The inner stream must be closed separately.stream - the stream to decorate.IOExceptionprotected abstract OutputStream decorateWithCompression(NonClosingOutputStreamDecorator stream) throws IOException
stream - the stream to decorateIOExceptionprotected abstract InputStream decorateWithCompression(NonClosingInputStreamDecorator stream) throws IOException
stream - the stream to decorate.IOExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.