uk.co.bigbeeconsultants.http.header

MediaType

case class MediaType(mainType: String, subtype: String, charset: Option[String] = scala.None) extends Value with Product with Serializable

Provides a media type. Also known as a MIME type or content type.

Linear Supertypes
Serializable, Serializable, Product, Equals, Value, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MediaType
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Value
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MediaType(mainType: String, subtype: String, charset: Option[String] = scala.None)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val charset: Option[String]

  8. def charsetOrElse(defaultCharset: String): String

    Gets the character set, or returns a default value.

  9. def charsetOrUTF8: String

    Gets the character set, or returns UTF8.

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def isCompatible(other: MediaType): Boolean

    Check if this media type is compatible with another media type.

    Check if this media type is compatible with another media type. E.g. image*/* is compatible with image/jpeg, image/png, etc. The function is commutative.

    other

    the media type to compare with

    returns

    true if the types are compatible, false otherwise.

  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. val isTextual: Boolean

    Tests whether a media type represents textual traffic.

    Tests whether a media type represents textual traffic. This is true for all content with the type of "text" and also for those "application" types with json, xml, or ...+xml subtypes.

  17. def isValid: Boolean

    Definition Classes
    MediaTypeValue
  18. def isWildcardSubtype: Boolean

    Checks if the subtype is a wildcard.

    Checks if the subtype is a wildcard.

    returns

    true if the subtype is a wildcard

  19. def isWildcardType: Boolean

    Checks if the primary type is a wildcard.

    Checks if the primary type is a wildcard.

    returns

    true if the primary type is a wildcard

  20. val mainType: String

  21. val mediaType: String

    Gets the main/sub type of this media type.

    Gets the main/sub type of this media type. That is, the textual representation without any charset.

  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. val subtype: String

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def toQualifiers: Qualifiers

    Gets this media type as a Qualifiers, which is the form used within QualifiedValue.

  28. def toString(): String

    Definition Classes
    Value → AnyRef → Any
  29. val value: String

    Gets mediaType and appends the charset, if there is one.

    Gets mediaType and appends the charset, if there is one.

    Definition Classes
    MediaTypeValue
  30. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  31. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  32. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  33. def withCharset(newCharset: String): MediaType

    Creates a new instance with a different charset.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Value

Inherited from AnyRef

Inherited from Any

Ungrouped