Enum EAS4CompressionMode

java.lang.Object
java.lang.Enum<EAS4CompressionMode>
com.helger.phase4.attachment.EAS4CompressionMode
All Implemented Interfaces:
com.helger.commons.id.IHasID<String>, Serializable, Comparable<EAS4CompressionMode>, java.lang.constant.Constable

public enum EAS4CompressionMode extends Enum<EAS4CompressionMode> implements com.helger.commons.id.IHasID<String>
Defines the allowed AS4 compression modes.
Author:
Philip Helger
  • Enum Constant Details

  • Method Details

    • values

      public static EAS4CompressionMode[] values()
      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

      public static EAS4CompressionMode valueOf(String name)
      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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getID

      @Nonnull @Nonempty public String getID()
      Specified by:
      getID in interface com.helger.commons.id.IHasID<String>
    • getMimeType

      @Nonnull public com.helger.commons.mime.IMimeType getMimeType()
      Returns:
      The MIME type of the compression mode. Never null.
    • getMimeTypeAsString

      @Nonnull @Nonempty public String getMimeTypeAsString()
      Returns:
      The string representation of the MIME type of the compression mode. Never null.
    • getFileExtension

      @Nonnull @Nonempty public String getFileExtension()
      Returns:
      The file extension including the leading dot (e.g. ".gz")
    • getDecompressStream

      @Nonnull public abstract InputStream getDecompressStream(@Nonnull InputStream aIS) throws IOException
      Get an InputStream to decompress the provided InputStream.
      Parameters:
      aIS - The source InputStream. May not be null.
      Returns:
      The decompressing InputStream
      Throws:
      IOException - In case of IO error
    • getCompressStream

      @Nonnull public abstract OutputStream getCompressStream(@Nonnull OutputStream aOS) throws IOException
      Get an OutputStream to compress the provided OutputStream.
      Parameters:
      aOS - The source OutputStream. May not be null.
      Returns:
      The compressing OutputStream
      Throws:
      IOException - In case of IO error
    • getFromMimeTypeStringOrNull

      @Nullable public static EAS4CompressionMode getFromMimeTypeStringOrNull(@Nullable String sMimeType)
    • getFromIDOrNull

      @Nullable public static EAS4CompressionMode getFromIDOrNull(String sID)