Package com.imyeyu.compress
Enum Class CompressType
- All Implemented Interfaces:
Serializable,Comparable<CompressType>,Constable
压缩算法类型
- Version:
- 2024-06-30 18:03
- Author:
- 夜雨
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionCompressor<?> compressFrom(File fromFile) 获取带源文件的压缩操作对象Compressor<?> compressFrom(String fromPath) 获取带源路径的压缩操作对象Decompressor<?> decompressedFrom(File fromFile) 获取带源文件的解压操作对象Decompressor<?> decompressedFrom(InputStream fromStream) 获取带源输入流的解压操作对象static Decompressor<?> 根据文件获取解压操作对象 会读取文件头识别压缩格式Compressor<?> 获取压缩操作对象Decompressor<?> 获取解压操作对象static CompressTypeReturns the enum constant of this class with the specified name.static CompressType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Z7
7z -
ZIP
Zip -
GZIP
Gzip -
TAR
Tar
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getCompressor
获取压缩操作对象- Returns:
- 压缩操作对象
- Throws:
Exception- 实例化失败
-
compressFrom
获取带源路径的压缩操作对象- Parameters:
fromPath- 源路径- Returns:
- 压缩操作对象
- Throws:
Exception- 实例化失败
-
compressFrom
获取带源文件的压缩操作对象- Parameters:
fromFile- 源文件- Returns:
- 压缩操作对象
- Throws:
Exception- 实例化失败
-
getDecompressor
获取解压操作对象- Returns:
- 解压操作对象
- Throws:
Exception- 实例化失败
-
decompressedFrom
获取带源文件的解压操作对象- Parameters:
fromFile- 源压缩文件- Returns:
- 解压操作对象
- Throws:
Exception- 实例化失败
-
decompressedFrom
获取带源输入流的解压操作对象- Parameters:
fromStream- 源压缩输入流- Returns:
- 解压操作对象
- Throws:
Exception- 实例化失败
-
from
根据文件获取解压操作对象 会读取文件头识别压缩格式- Parameters:
file- 文件- Returns:
- 解压操作对象
- Throws:
UnsupportedOperationException- 不支持的文件Exception- 实例化失败
-