Enum MediaTypes

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

    public enum MediaTypes
    extends java.lang.Enum<MediaTypes>
    MediaTypes class represents the media types supported by the REST API package This class serves as a wrapper to hide the third party library being used to make REST API calls
    • Enum Constant Detail

      • APPLICATION_XML

        public static final MediaTypes APPLICATION_XML
      • APPLICATION_JSON

        public static final MediaTypes APPLICATION_JSON
      • APPLICATION_OCTET_STREAM

        public static final MediaTypes APPLICATION_OCTET_STREAM
      • TEXT_PLAIN

        public static final MediaTypes TEXT_PLAIN
      • TEXT_XML

        public static final MediaTypes TEXT_XML
      • MEDIA_TYPE_WILDCARD

        public static final MediaTypes MEDIA_TYPE_WILDCARD
    • Method Detail

      • values

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

        public static MediaTypes 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
      • getValue

        public java.lang.String getValue()
      • getEnumConstantByValue

        public static MediaTypes getEnumConstantByValue​(java.lang.String value)