Enum Class MIMEType

java.lang.Object
java.lang.Enum<MIMEType>
org.w3c.epubcheck.constants.MIMEType
All Implemented Interfaces:
Serializable, Comparable<MIMEType>, Constable

public enum MIMEType extends Enum<MIMEType>
  • Enum Constant Details

    • CSS

      public static final MIMEType CSS
    • DTBOOK

      public static final MIMEType DTBOOK
    • EPUB

      public static final MIMEType EPUB
    • HTML

      public static final MIMEType HTML
    • IMAGE_JPEG

      public static final MIMEType IMAGE_JPEG
    • IMAGE_GIF

      public static final MIMEType IMAGE_GIF
    • IMAGE_PNG

      public static final MIMEType IMAGE_PNG
    • OEBPS

      public static final MIMEType OEBPS
    • PACKAGE_DOC

      public static final MIMEType PACKAGE_DOC
    • SEARCH_KEY_MAP

      public static final MIMEType SEARCH_KEY_MAP
    • SMIL

      public static final MIMEType SMIL
    • SVG

      public static final MIMEType SVG
    • XHTML

      public static final MIMEType XHTML
    • OTHER

      public static final MIMEType OTHER
  • Field Details

  • Constructor Details

    • MIMEType

      private MIMEType(String definition)
  • Method Details

    • values

      public static MIMEType[] 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 MIMEType 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
    • toString

      public String toString()
      Overrides:
      toString in class Enum<MIMEType>
    • is

      public boolean is(String string)
    • get

      public static MIMEType get(String name)
    • removeParams

      public static String removeParams(String typeString)
      Removes the (optional) parameters from a valid MIME type string, as defined in the MIME Sniffing standard. In other words, this returns the essence ("type/subtype") of the MIME type described in the given string.

      For instance, calling this method on MIME type string "audio/ogg; codecs=speex" will return the string "audio/ogg".

      Note: no validation is performed on the MIME type string itself; it simply returns the substring before the first ";" character.

      Parameters:
      typeString - a MIME type string
      Returns:
      a MIME type string with any parameter removed