Enum MimeType

    • Enum Constant Detail

      • AUDIO_MPEG

        public static final MimeType AUDIO_MPEG
      • AUDIO_OGG

        public static final MimeType AUDIO_OGG
      • AUDIO_XWAV

        public static final MimeType AUDIO_XWAV
      • AUDIO_XMSWMA

        public static final MimeType AUDIO_XMSWMA
      • AUDIO_MPEGURL

        public static final MimeType AUDIO_MPEGURL
      • AUDIO_XMPEGURL

        public static final MimeType AUDIO_XMPEGURL
      • AUDIO_XSCPLS

        public static final MimeType AUDIO_XSCPLS
      • APPLICATION_OGG

        public static final MimeType APPLICATION_OGG
      • APPLICATION_PLS_XML

        public static final MimeType APPLICATION_PLS_XML
      • AUDIO_AAC

        public static final MimeType AUDIO_AAC
    • 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​(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
      • byContentType

        public static Optional<MimeType> byContentType​(String contentType)
        Finds the mime type by content type.
        Parameters:
        contentType - a content type String for example "audio/mpeg".
        Returns:
        the identified enum instance wrapped in an Optional with the possibility of an empty Optional if not found.