@Internal public abstract class StreamCompressionDecorator extends Object implements Serializable
Constructor and Description |
---|
StreamCompressionDecorator() |
Modifier and Type | Method and Description |
---|---|
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.IOException
public 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.IOException
protected abstract OutputStream decorateWithCompression(NonClosingOutputStreamDecorator stream) throws IOException
stream
- the stream to decorateIOException
protected abstract InputStream decorateWithCompression(NonClosingInputStreamDecorator stream) throws IOException
stream
- the stream to decorate.IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.