Class MediaType

    • Field Detail

      • APPLICATION_JSON_TYPE

        public static final java.lang.String APPLICATION_JSON_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_OCTET_STREAM_TYPE

        public static final java.lang.String APPLICATION_OCTET_STREAM_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_OBJECT_TYPE

        public static final java.lang.String APPLICATION_OBJECT_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_PDF_TYPE

        public static final java.lang.String APPLICATION_PDF_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_RTF_TYPE

        public static final java.lang.String APPLICATION_RTF_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_SERIALIZED_OBJECT_TYPE

        public static final java.lang.String APPLICATION_SERIALIZED_OBJECT_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_XML_TYPE

        public static final java.lang.String APPLICATION_XML_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_ZIP_TYPE

        public static final java.lang.String APPLICATION_ZIP_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_JBOSS_MARSHALLING_TYPE

        public static final java.lang.String APPLICATION_JBOSS_MARSHALLING_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_PROTOSTREAM_TYPE

        public static final java.lang.String APPLICATION_PROTOSTREAM_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_UNKNOWN_TYPE

        public static final java.lang.String APPLICATION_UNKNOWN_TYPE
        See Also:
        Constant Field Values
      • WWW_FORM_URLENCODED_TYPE

        public static final java.lang.String WWW_FORM_URLENCODED_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_INFINISPAN_MARSHALLING_TYPE

        public static final java.lang.String APPLICATION_INFINISPAN_MARSHALLING_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_INFINISPAN_BINARY_TYPE

        public static final java.lang.String APPLICATION_INFINISPAN_BINARY_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_PROTOSTUFF_TYPE

        public static final java.lang.String APPLICATION_PROTOSTUFF_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_KRYO_TYPE

        public static final java.lang.String APPLICATION_KRYO_TYPE
        See Also:
        Constant Field Values
      • APPLICATION_JSON

        public static MediaType APPLICATION_JSON
      • APPLICATION_OCTET_STREAM

        public static MediaType APPLICATION_OCTET_STREAM
      • APPLICATION_OBJECT

        public static MediaType APPLICATION_OBJECT
      • APPLICATION_SERIALIZED_OBJECT

        public static MediaType APPLICATION_SERIALIZED_OBJECT
      • APPLICATION_XML

        public static MediaType APPLICATION_XML
      • APPLICATION_PROTOSTREAM

        public static MediaType APPLICATION_PROTOSTREAM
      • APPLICATION_JBOSS_MARSHALLING

        public static MediaType APPLICATION_JBOSS_MARSHALLING
      • APPLICATION_INFINISPAN_MARSHALLED

        public static MediaType APPLICATION_INFINISPAN_MARSHALLED
      • APPLICATION_WWW_FORM_URLENCODED

        public static MediaType APPLICATION_WWW_FORM_URLENCODED
      • IMAGE_PNG

        public static MediaType IMAGE_PNG
      • TEXT_PLAIN

        public static MediaType TEXT_PLAIN
      • TEXT_HTML

        public static MediaType TEXT_HTML
      • IMAGE_GIF

        public static MediaType IMAGE_GIF
      • IMAGE_JPEG

        public static MediaType IMAGE_JPEG
      • APPLICATION_PROTOSTUFF

        public static MediaType APPLICATION_PROTOSTUFF
      • APPLICATION_KRYO

        public static MediaType APPLICATION_KRYO
      • APPLICATION_INFINISPAN_BINARY

        public static MediaType APPLICATION_INFINISPAN_BINARY
      • APPLICATION_PDF

        public static MediaType APPLICATION_PDF
      • APPLICATION_RTF

        public static MediaType APPLICATION_RTF
      • APPLICATION_ZIP

        public static MediaType APPLICATION_ZIP
      • APPLICATION_INFINISPAN_MARSHALLING

        public static MediaType APPLICATION_INFINISPAN_MARSHALLING
      • APPLICATION_UNKNOWN

        public static MediaType APPLICATION_UNKNOWN
      • MATCH_ALL

        public static MediaType MATCH_ALL
    • Constructor Detail

      • MediaType

        public MediaType​(java.lang.String type,
                         java.lang.String subtype)
      • MediaType

        public MediaType​(java.lang.String type,
                         java.lang.String subtype,
                         java.util.Map<java.lang.String,​java.lang.String> params)
    • Method Detail

      • fromString

        public static MediaType fromString​(java.lang.String mediaType)
      • parse

        public static MediaType parse​(java.lang.String str)
      • parseList

        public static java.util.stream.Stream<MediaType> parseList​(java.lang.String mediaTypeList)
      • match

        public boolean match​(MediaType other)
      • matchesAll

        public boolean matchesAll()
      • getTypeSubtype

        public java.lang.String getTypeSubtype()
      • withoutParameters

        public MediaType withoutParameters()
      • getWeight

        public double getWeight()
      • getCharset

        public java.nio.charset.Charset getCharset()
      • getClassType

        public java.lang.String getClassType()
      • withClassType

        public MediaType withClassType​(java.lang.Class<?> clazz)
      • hasStringType

        public boolean hasStringType()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getType

        public java.lang.String getType()
      • getSubType

        public java.lang.String getSubType()
      • hasParameters

        public boolean hasParameters()
      • getParameter

        public java.util.Optional<java.lang.String> getParameter​(java.lang.String name)
      • getParameters

        public java.util.Map<java.lang.String,​java.lang.String> getParameters()
      • withParameters

        public MediaType withParameters​(java.util.Map<java.lang.String,​java.lang.String> parameters)
      • withCharset

        public MediaType withCharset​(java.nio.charset.Charset charset)
      • withParameter

        public MediaType withParameter​(java.lang.String name,
                                       java.lang.String value)
      • toStringExcludingParam

        public java.lang.String toStringExcludingParam​(java.lang.String... params)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object