Interface ContentType

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  ContentType.Binary
      Represents a content-type which we know not to contain text (will never have a charset)
      static interface  ContentType.NonBinary
      Represents a content-type which we know to contain text, and has a specified charset.
      static interface  ContentType.WithCharset
      Represents a content-type which we know to contain text, and the charset is known at runtime.
      static interface  ContentType.WithFixedCharset
      Represents a content-type which we know to contain text, where the charset always has the same predefined value.
      static interface  ContentType.WithMissingCharset
      Represents a content-type which we know to contain text, and would be better off having a charset, but the client hasn't provided that.
    • Method Detail

      • mediaType

        MediaType mediaType()
        The media-type of this content-type.
        Returns:
        (undocumented)
      • binary

        boolean binary()
        True if this ContentType is non-textual.
        Returns:
        (undocumented)
      • getCharsetOption

        java.util.Optional<HttpCharset> getCharsetOption()
        Returns the charset if this ContentType is non-binary.
        Returns:
        (undocumented)