Enum MimeType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MimeType>

    public enum MimeType
    extends java.lang.Enum<MimeType>
    Represents a MIME type.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DOCX
      Open XML word processing document (application/vnd.openxmlformats-officedocument.wordprocessingml.document).
      GIF
      GIF Image (image/gif).
      GRAPHML
      Graph Markup Language (application/graphml+xml).
      HTML
      HyperText Markup Language (text/html)
      JIIX
      Json Interactive Ink eXchange format (application/vnd.myscript.jiix).
      JPEG
      JPEG Image (image/jpeg).
      LATEX
      LaTeX (application/x-latex).
      MATHML
      Mathematical Markup Language (application/mathml+xml).
      MUSICXML
      Music Extensible Markup Language (application/vnd.recordare.musicxml+xml).
      OFFICE_CLIPBOARD
      Microsoft Office Clipboard format (Art::GVML ClipFormat).
      PDF
      Portable Document Format (application/pdf).
      PNG
      PNG Image (image/png).
      PPTX
      Open XML presentation (application/vnd.openxmlformats-officedocument.presentationml.presentation).
      SVG
      Scalable Vector Graphics (image/svg+xml).
      TEXT
      Plain text (text/plain).
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull MimeType forValue​(int value)  
      static @NotNull MimeType fromTypeName​(@NotNull java.lang.String typeName)  
      @NotNull java.lang.String getFileExtensions()
      Returns a comma separated list of file extensions.
      @NotNull java.lang.String getName()
      Returns a descriptive name in English.
      @NotNull java.lang.String getTypeName()
      Returns the name of the media type, in the form "type/subtype".
      boolean isImage()  
      boolean isTextual()  
      int value()
      Returns the mime type unique integer value.
      static MimeType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MimeType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • TEXT

        public static final MimeType TEXT
        Plain text (text/plain).
      • HTML

        public static final MimeType HTML
        HyperText Markup Language (text/html)
      • MATHML

        public static final MimeType MATHML
        Mathematical Markup Language (application/mathml+xml).
      • LATEX

        public static final MimeType LATEX
        LaTeX (application/x-latex).
      • GRAPHML

        public static final MimeType GRAPHML
        Graph Markup Language (application/graphml+xml).
      • MUSICXML

        public static final MimeType MUSICXML
        Music Extensible Markup Language (application/vnd.recordare.musicxml+xml).
      • SVG

        public static final MimeType SVG
        Scalable Vector Graphics (image/svg+xml).
      • JIIX

        public static final MimeType JIIX
        Json Interactive Ink eXchange format (application/vnd.myscript.jiix).
      • JPEG

        public static final MimeType JPEG
        JPEG Image (image/jpeg).
      • PNG

        public static final MimeType PNG
        PNG Image (image/png).
      • GIF

        public static final MimeType GIF
        GIF Image (image/gif).
      • PDF

        public static final MimeType PDF
        Portable Document Format (application/pdf).
      • DOCX

        public static final MimeType DOCX
        Open XML word processing document (application/vnd.openxmlformats-officedocument.wordprocessingml.document).
      • PPTX

        public static final MimeType PPTX
        Open XML presentation (application/vnd.openxmlformats-officedocument.presentationml.presentation).
      • OFFICE_CLIPBOARD

        public static final MimeType OFFICE_CLIPBOARD
        Microsoft Office Clipboard format (Art::GVML ClipFormat).
        Since:
        1.1
    • Method Detail

      • values

        public static MimeType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MimeType c : MimeType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MimeType valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • value

        public int value()
        Returns the mime type unique integer value.
        Returns:
        the mime type integer value.
      • getName

        @NotNull
        public @NotNull java.lang.String getName()
        Returns a descriptive name in English.
        Returns:
        the descriptive name.
      • getTypeName

        @NotNull
        public @NotNull java.lang.String getTypeName()
        Returns the name of the media type, in the form "type/subtype".
        Returns:
        the name of the media type.
      • getFileExtensions

        @NotNull
        public @NotNull java.lang.String getFileExtensions()
        Returns a comma separated list of file extensions.
        Returns:
        the file extensions, or null
      • fromTypeName

        @NotNull
        public static @NotNull MimeType fromTypeName​(@NotNull
                                                     @NotNull java.lang.String typeName)
      • forValue

        @NotNull
        public static @NotNull MimeType forValue​(int value)
      • isTextual

        public boolean isTextual()
      • isImage

        public boolean isImage()