Class MediaType


  • public final class MediaType
    extends Object
    Syntactic sugar around a media type string. Contains predefined ones, but is open-ended for when we support dynamic rest handlers better.
    • Method Detail

      • is

        public boolean is​(String typeString)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • from

        public static MediaType from​(String typeString)
        Returns one of the static members (OCTET_STREAM, CSV, etc) if this is a known type or a new object if the type is unknown.
        Parameters:
        typeString -
        Returns:
        the MediaType object corresponding to the type string