public final class CompressorFactory extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFLATE_COMPRESS_FORMAT
variable DEFLATE_COMPRESS_FORMAT
|
static String |
GZIP_COMPRESS_FORMAT
variable GZIP_COMPRESS_FORMAT
|
Modifier and Type | Method and Description |
---|---|
static ICompressor |
getCompressor(String compressFormat)
Method to get the corresponding compressor class for the given compress format
|
static CompressorFactory |
getInstance()
Method to get the CompressorFactory instance
|
static boolean |
isValidCompressFormat(String compressFormat)
Method to validate whether the given compression format is valid
|
public static final String GZIP_COMPRESS_FORMAT
public static final String DEFLATE_COMPRESS_FORMAT
public static CompressorFactory getInstance()
public static ICompressor getCompressor(String compressFormat) throws CompressionException
compressFormat
- the format of the compressor to decide the compressorCompressionException
- the compression exceptionpublic static boolean isValidCompressFormat(String compressFormat) throws CompressionException
compressFormat
- the compress formatCompressionException
- the compression exceptionCopyright © 2021. All Rights Reserved.