Enum Class EAS4CompressionMode

java.lang.Object
java.lang.Enum<EAS4CompressionMode>
com.helger.phase4.attachment.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
  • Enum Constant Details

  • Method Details

    • values

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

      public static EAS4CompressionMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getID

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

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

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

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

      public abstract @NonNull 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

      public abstract @NonNull 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

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

      public static @Nullable EAS4CompressionMode getFromIDOrNull(String sID)