Package com.helger.phase4.attachment
Enum Class EAS4CompressionMode
- All Implemented Interfaces:
com.helger.base.id.IHasID<String>,Serializable,Comparable<EAS4CompressionMode>,Constable
public enum EAS4CompressionMode
extends Enum<EAS4CompressionMode>
implements com.helger.base.id.IHasID<String>
Defines the allowed AS4 compression modes.
- Author:
- Philip Helger
-
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 TypeMethodDescriptionabstract @NonNull OutputStreamgetCompressStream(@NonNull OutputStream aOS) Get anOutputStreamto compress the providedOutputStream.abstract @NonNull InputStreamgetDecompressStream(@NonNull InputStream aIS) Get anInputStreamto decompress the providedInputStream.@NonNull @Nonempty Stringstatic @Nullable EAS4CompressionModegetFromIDOrNull(String sID) static @Nullable EAS4CompressionModegetFromMimeTypeStringOrNull(@Nullable String sMimeType) @NonNull @Nonempty StringgetID()@NonNull com.helger.mime.IMimeType@NonNull @Nonempty Stringstatic EAS4CompressionModeReturns the enum constant of this class with the specified name.static EAS4CompressionMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GZIP
GZip compression mode
-
-
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
-
getID
- Specified by:
getIDin interfacecom.helger.base.id.IHasID<String>
-
getMimeType
public @NonNull com.helger.mime.IMimeType getMimeType()- Returns:
- The MIME type of the compression mode. Never
null.
-
getMimeTypeAsString
- Returns:
- The string representation of the MIME type of the compression mode. Never
null.
-
getFileExtension
- Returns:
- The file extension including the leading dot (e.g. ".gz")
-
getDecompressStream
public abstract @NonNull InputStream getDecompressStream(@NonNull InputStream aIS) throws IOException Get anInputStreamto decompress the providedInputStream.- Parameters:
aIS- The sourceInputStream. May not benull.- Returns:
- The decompressing
InputStream - Throws:
IOException- In case of IO error
-
getCompressStream
public abstract @NonNull OutputStream getCompressStream(@NonNull OutputStream aOS) throws IOException Get anOutputStreamto compress the providedOutputStream.- Parameters:
aOS- The sourceOutputStream. May not benull.- Returns:
- The compressing
OutputStream - Throws:
IOException- In case of IO error
-
getFromMimeTypeStringOrNull
-
getFromIDOrNull
-