|
Kieker 1.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<BinaryCompressionMethod> kieker.common.util.filesystem.BinaryCompressionMethod
public enum BinaryCompressionMethod
This enum delivers different compression methods, which can be used to read and write compressed binary files.
Enum Constant Summary | |
---|---|
DEFLATE
A binary compression method using the compression format "deflate". |
|
GZIP
A binary compression method using the compression format "GZIP". |
|
NONE
A binary compression method using no compression format. |
|
ZIP
A binary compression method using the compression format "ZIP". |
Method Summary | |
---|---|
static BinaryCompressionMethod |
getByFileExtension(String name)
This method tries to search for a suitable compression method using the extension of the file. |
abstract DataInputStream |
getDataInputStream(File inputFile,
int bufferSize)
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 DataOutputStream |
getDataOutputStream(File outputFile,
int bufferSize)
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. |
String |
getFileExtension()
|
static boolean |
hasValidFileExtension(String name)
This method checks whether there exists a suitable compression method for the extension of the file. |
static BinaryCompressionMethod |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static BinaryCompressionMethod[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final BinaryCompressionMethod NONE
public static final BinaryCompressionMethod DEFLATE
public static final BinaryCompressionMethod GZIP
public static final BinaryCompressionMethod ZIP
Method Detail |
---|
public static final BinaryCompressionMethod[] values()
for(BinaryCompressionMethod c : BinaryCompressionMethod.values()) System.out.println(c);
public static BinaryCompressionMethod valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified namepublic final String getFileExtension()
public abstract DataOutputStream getDataOutputStream(File outputFile, int bufferSize) throws IOException
outputFile
- The output file.bufferSize
- The buffer size for the stream
IOException
- If something went wrong during the initialization.public abstract DataInputStream getDataInputStream(File inputFile, int bufferSize) throws IOException
inputFile
- The input file.bufferSize
- The buffer size for the stream
IOException
- If something went wrong during the initialization.public static final boolean hasValidFileExtension(String name)
name
- The name of the file.
getByFileExtension(String)
public static final BinaryCompressionMethod getByFileExtension(String name) throws IllegalArgumentException
name
- The name of the file.
IllegalArgumentException
- If a suitable method was not found.hasValidFileExtension(String)
|
Kieker 1.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |