Class AbstractContentBody

    • Constructor Detail

      • AbstractContentBody

        public AbstractContentBody​(ContentType contentType)
        Since:
        4.3
    • Method Detail

      • getContentType

        public ContentType getContentType()
        Since:
        4.3
      • getMimeType

        public MimeType getMimeType()
        Description copied from interface: ContentBody
        Returns the body descriptors MIME type.
        Specified by:
        getMimeType in interface ContentBody
        Returns:
        The MIME type, which has been parsed from the content-type definition. Must not be null, but "text/plain", if no content-type was specified.
      • getCharset

        public String getCharset()
        Description copied from interface: ContentBody

        The body descriptors character set, defaulted appropriately for the MIME type.

        For TEXT types, this will be defaulted to us-ascii. For other types, when the charset parameter is missing this property will be null.

        Specified by:
        getCharset in interface ContentBody
        Returns:
        Character set, which has been parsed from the content-type definition. Not null for TEXT types, when unset will be set to default us-ascii. For other types, when unset, null will be returned.