Class ParsedContentType

  • All Implemented Interfaces:
    Serializable

    public final class ParsedContentType
    extends Object
    implements Serializable
    Breaks a "contentType; charset=encoding" MIME type into content type and encoding parts.
    See Also:
    Serialized Form
    • Constructor Detail

      • ParsedContentType

        public ParsedContentType​(String mimeType)
        Creates a new parsed content type.
        Parameters:
        mimeType - the full MIME type; typically the value of the "Content-Type" header of some MIME-compliant message. Can be null.
    • Method Detail

      • getContentType

        public String getContentType()
        Returns the content type (without charset declaration) of the MIME type.
        Returns:
        the content type (without charset declaration) of the MIME type. Can be null if the MIME type was null.
      • getEncoding

        public String getEncoding()
        Returns the character encoding of the MIME type.
        Returns:
        the character encoding of the MIME type. Can be null when it is not specified.