Class AbstractHttpEntity

    • Method Detail

      • getContentType

        public Header getContentType()
        Obtains the Content-Type header. The default implementation returns the value of the contentType attribute.
        Specified by:
        getContentType in interface HttpEntity
        Returns:
        the Content-Type header, or null
      • getContentEncoding

        public Header getContentEncoding()
        Obtains the Content-Encoding header. The default implementation returns the value of the contentEncoding attribute.
        Specified by:
        getContentEncoding in interface HttpEntity
        Returns:
        the Content-Encoding header, or null
      • isChunked

        public boolean isChunked()
        Obtains the 'chunked' flag. The default implementation returns the value of the chunked attribute.
        Specified by:
        isChunked in interface HttpEntity
        Returns:
        the 'chunked' flag
      • setContentType

        public void setContentType​(Header contentType)
        Specifies the Content-Type header. The default implementation sets the value of the contentType attribute.
        Parameters:
        contentType - the new Content-Type header, or null to unset
      • setContentType

        public void setContentType​(java.lang.String ctString)
        Specifies the Content-Type header, as a string. The default implementation calls setContentType(Header).
        Parameters:
        ctString - the new Content-Type header, or null to unset
      • setContentEncoding

        public void setContentEncoding​(Header contentEncoding)
        Specifies the Content-Encoding header. The default implementation sets the value of the contentEncoding attribute.
        Parameters:
        contentEncoding - the new Content-Encoding header, or null to unset
      • setContentEncoding

        public void setContentEncoding​(java.lang.String ceString)
        Specifies the Content-Encoding header, as a string. The default implementation calls setContentEncoding(Header).
        Parameters:
        ceString - the new Content-Encoding header, or null to unset
      • setChunked

        public void setChunked​(boolean b)
        Specifies the 'chunked' flag.

        Note that the chunked setting is a hint only. If using HTTP/1.0, chunking is never performed. Otherwise, even if chunked is false, HttpClient must use chunk coding if the entity content length is unknown (-1).

        The default implementation sets the value of the chunked attribute.

        Parameters:
        b - the new 'chunked' flag
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object