Enum MediaType

    • Enum Constant Detail

      • APPLICATION_XML

        public static final MediaType APPLICATION_XML
      • APPLICATION_ATOM_XML

        public static final MediaType APPLICATION_ATOM_XML
      • APPLICATION_XHTML_XML

        public static final MediaType APPLICATION_XHTML_XML
      • APPLICATION_SVG_XML

        public static final MediaType APPLICATION_SVG_XML
      • APPLICATION_JSON

        public static final MediaType APPLICATION_JSON
      • APPLICATION_FORM_URLENCODED

        public static final MediaType APPLICATION_FORM_URLENCODED
      • MULTIPART_FORM_DATA

        public static final MediaType MULTIPART_FORM_DATA
      • APPLICATION_OCTET_STREAM

        public static final MediaType APPLICATION_OCTET_STREAM
      • TEXT_PLAIN

        public static final MediaType TEXT_PLAIN
      • TEXT_XML

        public static final MediaType TEXT_XML
      • TEXT_HTML

        public static final MediaType TEXT_HTML
    • Field Detail

      • key

        public final String key
    • Method Detail

      • values

        public static MediaType[] 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 (MediaType c : MediaType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MediaType 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