Enum Class MediaType

java.lang.Object
java.lang.Enum<MediaType>
com.wechat.pay.java.core.http.MediaType
All Implemented Interfaces:
Serializable, Comparable<MediaType>, Constable

public enum MediaType extends Enum<MediaType>
HTTP媒体类型
  • Enum Constant Details

    • APPLICATION_JSON

      public static final MediaType APPLICATION_JSON
    • MULTIPART_FORM_DATA

      public static final MediaType MULTIPART_FORM_DATA
    • APPLICATION_X_GZIP

      public static final MediaType APPLICATION_X_GZIP
    • APPLICATION_OCTET_STREAM

      public static final MediaType APPLICATION_OCTET_STREAM
  • Method Details

    • values

      public static MediaType[] 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 MediaType 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
    • getValue

      public String getValue()
    • equalsWith

      public boolean equalsWith(String string)