public enum BinaryCompressionMethod extends java.lang.Enum<BinaryCompressionMethod>
Enum Constant and Description |
---|
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".
|
Modifier and Type | Method and Description |
---|---|
static BinaryCompressionMethod |
getByFileExtension(java.lang.String name)
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)
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)
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() |
static boolean |
hasValidFileExtension(java.lang.String name)
This method checks whether there exists a suitable compression method for the extension of the file.
|
static BinaryCompressionMethod |
valueOf(java.lang.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 are declared.
|
public static final BinaryCompressionMethod NONE
public static final BinaryCompressionMethod DEFLATE
public static final BinaryCompressionMethod GZIP
public static final BinaryCompressionMethod ZIP
public static BinaryCompressionMethod[] values()
for (BinaryCompressionMethod c : BinaryCompressionMethod.values()) System.out.println(c);
public static BinaryCompressionMethod valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic final java.lang.String getFileExtension()
public abstract java.io.DataOutputStream getDataOutputStream(java.io.File outputFile, int bufferSize) throws java.io.IOException
outputFile
- The output file.bufferSize
- The buffer size for the streamjava.io.IOException
- If something went wrong during the initialization.public abstract java.io.DataInputStream getDataInputStream(java.io.File inputFile, int bufferSize) throws java.io.IOException
inputFile
- The input file.bufferSize
- The buffer size for the streamjava.io.IOException
- If something went wrong during the initialization.public static final boolean hasValidFileExtension(java.lang.String name)
name
- The name of the file.getByFileExtension(String)
public static final BinaryCompressionMethod getByFileExtension(java.lang.String name) throws java.lang.IllegalArgumentException
name
- The name of the file.java.lang.IllegalArgumentException
- If a suitable method was not found.hasValidFileExtension(String)
Copyright 2017 Kieker Project, http://kieker-monitoring.net