Enum MimeType

java.lang.Object
java.lang.Enum<MimeType>
net.aifusion.cimserver.MimeType
All Implemented Interfaces:
Serializable, Comparable<MimeType>, java.lang.constant.Constable

public enum MimeType extends Enum<MimeType>
Known MIME types to the Server
Author:
Sharad Singhal
  • Enum Constant Details

    • PLAINTEXT

      public static final MimeType PLAINTEXT
      Plain text type
    • MOF

      public static final MimeType MOF
      MOF text type
    • HTML

      public static final MimeType HTML
      HTML type
    • TEXT

      public static final MimeType TEXT
      Plain text type
    • BINARY

      public static final MimeType BINARY
      Binary stream type
    • ZIP

      public static final MimeType ZIP
      Chunked ang zipped type
  • Method Details

    • values

      public static MimeType[] 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 MimeType 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
    • getExtension

      public String getExtension()
      Get an extension for this type
      Returns:
      - extension associated with this type
    • getType

      public String getType()
      Get the mime type associated with this type
      Returns:
      - mime type associated with this type
    • lookup

      public static MimeType lookup(String h)
      Look up a mime type associated with a given extension
      Parameters:
      h - - extension for the type
      Returns:
      - first matching MimeType that matches the extension. Default is BINARY (RFC 2616)