Enum Class MediaTypes

java.lang.Object
java.lang.Enum<MediaTypes>
org.frankframework.http.rest.MediaTypes
All Implemented Interfaces:
Serializable, Comparable<MediaTypes>, Constable

public enum MediaTypes extends Enum<MediaTypes>
  • Enum Constant Details

  • Method Details

    • values

      public static MediaTypes[] 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 MediaTypes 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
    • getDefaultCharset

      public Charset getDefaultCharset()
      returns the default charset for the given mediatype or null when non is allowed
    • includes

      public boolean includes(@Nullable String contentTypeHeader)
      Matches the provided 'Content-Type' to this enum, should always be valid, is not weighted
    • accepts

      public boolean accepts(@Nullable String acceptHeader)
      Checks if this enum matches a value in the provided 'Accept' header.
    • fromValue

      public static MediaTypes fromValue(String contentType)
    • getMimeType

      public org.springframework.util.MimeType getMimeType()
      Returns the MimeType without any parameters (such as charset)
    • getMimeType

      public org.springframework.util.MimeType getMimeType(String charset)