Package org.pentaho.di.core.compress.zip
Class ZIPCompressionProvider
- java.lang.Object
-
- org.pentaho.di.core.compress.zip.ZIPCompressionProvider
-
- All Implemented Interfaces:
CompressionProvider
public class ZIPCompressionProvider extends Object implements CompressionProvider
-
-
Constructor Summary
Constructors Constructor Description ZIPCompressionProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZIPCompressionInputStreamcreateInputStream(InputStream in)Creates an input stream that decompresses data (according to the provider's implementation)ZIPCompressionOutputStreamcreateOutputStream(OutputStream out)Creates an output stream that compresses data (according to the provider's implementation)StringgetDefaultExtension()Gets the default file extension for this provider.StringgetDescription()Gets the name of this provider.StringgetName()Gets the name of this provider.booleansupportsInput()Whether this compression provider supports input streamsbooleansupportsOutput()Whether this compression provider supports output streams
-
-
-
Method Detail
-
createInputStream
public ZIPCompressionInputStream createInputStream(InputStream in) throws IOException
Description copied from interface:CompressionProviderCreates an input stream that decompresses data (according to the provider's implementation)- Specified by:
createInputStreamin interfaceCompressionProvider- Parameters:
in- An existing input stream to wrap- Returns:
- a CompressionInputStream object that decompresses incoming data
- Throws:
IOException
-
supportsInput
public boolean supportsInput()
Description copied from interface:CompressionProviderWhether this compression provider supports input streams- Specified by:
supportsInputin interfaceCompressionProvider- Returns:
- true if the provider supports input streams, false otherwise
-
createOutputStream
public ZIPCompressionOutputStream createOutputStream(OutputStream out) throws IOException
Description copied from interface:CompressionProviderCreates an output stream that compresses data (according to the provider's implementation)- Specified by:
createOutputStreamin interfaceCompressionProvider- Parameters:
out- An existing output stream to wrap- Returns:
- a CompressionOutputStream object that compresses outgoing data
- Throws:
IOException
-
supportsOutput
public boolean supportsOutput()
Description copied from interface:CompressionProviderWhether this compression provider supports output streams- Specified by:
supportsOutputin interfaceCompressionProvider- Returns:
- true if the provider supports output streams, false otherwise
-
getDescription
public String getDescription()
Description copied from interface:CompressionProviderGets the name of this provider. Used for display e.g.- Specified by:
getDescriptionin interfaceCompressionProvider- Returns:
- A String containing a description of this provider
-
getName
public String getName()
Description copied from interface:CompressionProviderGets the name of this provider. Used for display and as a reference in saved artifacts (transformations, e.g.)- Specified by:
getNamein interfaceCompressionProvider- Returns:
- A String containing the name of this provider
-
getDefaultExtension
public String getDefaultExtension()
Description copied from interface:CompressionProviderGets the default file extension for this provider. If the streams are wrapped in File streams, this method can be used to determine an appropriate extension to append to the filename so the file will be recognized as an artifact of the compression mechanism (.zip, .bz2, e.g.)- Specified by:
getDefaultExtensionin interfaceCompressionProvider- Returns:
- A String containing the default file extension for this provider
-
-