Package kieker.common.util.filesystem
Enum BinaryCompressionMethod
java.lang.Object
java.lang.Enum<BinaryCompressionMethod>
kieker.common.util.filesystem.BinaryCompressionMethod
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<BinaryCompressionMethod>
,java.lang.constant.Constable
@Deprecated public enum BinaryCompressionMethod extends java.lang.Enum<BinaryCompressionMethod>
Deprecated.
since 1.15 remove in 1.16
This enum delivers different compression methods, which can be used to read and write compressed binary files.
- Since:
- 1.7
- Author:
- Jan Waller
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFLATE
Deprecated.A binary compression method using the compression format "deflate".GZIP
Deprecated.A binary compression method using the compression format "GZIP".NONE
Deprecated.A binary compression method using no compression format.ZIP
Deprecated.A binary compression method using the compression format "ZIP". -
Method Summary
Modifier and Type Method Description static BinaryCompressionMethod
getByFileExtension(java.lang.String name)
Deprecated.This method tries to search for a suitable compression method using the extension of the file.abstract java.io.DataInputStream
getDataInputStream(java.io.File inputFile, int bufferSize)
Deprecated.Implementing compression methods should override this method to deliver an input stream which can be used to read data in a non-compressed way from the given file.abstract java.io.DataOutputStream
getDataOutputStream(java.io.File outputFile, int bufferSize)
Deprecated.Implementing compression methods should override this method to deliver an output stream which can be used to write data in a compressed way into the given file.java.lang.String
getFileExtension()
Deprecated.static boolean
hasValidFileExtension(java.lang.String name)
Deprecated.This method checks whether there exists a suitable compression method for the extension of the file.static BinaryCompressionMethod
valueOf(java.lang.String name)
Deprecated.Returns the enum constant of this type with the specified name.static BinaryCompressionMethod[]
values()
Deprecated.Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NONE
Deprecated.A binary compression method using no compression format. -
DEFLATE
Deprecated.A binary compression method using the compression format "deflate". -
GZIP
Deprecated.A binary compression method using the compression format "GZIP". -
ZIP
Deprecated.A binary compression method using the compression format "ZIP".
-
-
Method Details
-
values
Deprecated.Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getFileExtension
public final java.lang.String getFileExtension()Deprecated. -
getDataOutputStream
public abstract java.io.DataOutputStream getDataOutputStream(java.io.File outputFile, int bufferSize) throws java.io.IOExceptionDeprecated.Implementing compression methods should override this method to deliver an output stream which can be used to write data in a compressed way into the given file.- Parameters:
outputFile
- The output file.bufferSize
- The buffer size for the stream- Returns:
- A new output stream for the given file.
- Throws:
java.io.IOException
- If something went wrong during the initialization.
-
getDataInputStream
public abstract java.io.DataInputStream getDataInputStream(java.io.File inputFile, int bufferSize) throws java.io.IOExceptionDeprecated.Implementing compression methods should override this method to deliver an input stream which can be used to read data in a non-compressed way from the given file.- Parameters:
inputFile
- The input file.bufferSize
- The buffer size for the stream- Returns:
- A new input stream for the given file.
- Throws:
java.io.IOException
- If something went wrong during the initialization.
-
hasValidFileExtension
public static final boolean hasValidFileExtension(java.lang.String name)Deprecated.This method checks whether there exists a suitable compression method for the extension of the file.- Parameters:
name
- The name of the file.- Returns:
- true if a suitable compression method exists.
- See Also:
getByFileExtension(String)
-
getByFileExtension
public static final BinaryCompressionMethod getByFileExtension(java.lang.String name) throws java.lang.IllegalArgumentExceptionDeprecated.This method tries to search for a suitable compression method using the extension of the file.- Parameters:
name
- The name of the file.- Returns:
- A suitable compression method if it exists.
- Throws:
java.lang.IllegalArgumentException
- If a suitable method was not found.- See Also:
hasValidFileExtension(String)
-