Class StringRequestEntity

    • Constructor Detail

      • StringRequestEntity

        public StringRequestEntity​(java.lang.String content,
                                   java.lang.String contentType,
                                   java.lang.String charset)
                            throws java.io.UnsupportedEncodingException
        Deprecated.
        Creates a new entity with the given content, content type, and charset.
        Parameters:
        content - The content to set.
        contentType - The type of the content, or null. The value retured by getContentType(). If this content type contains a charset and the charset parameter is null, the content's type charset will be used.
        charset - The charset of the content, or null. Used to convert the content to bytes. If the content type does not contain a charset and charset is not null, then the charset will be appended to the content type.
        Throws:
        java.io.UnsupportedEncodingException
    • Method Detail

      • writeRequest

        public void writeRequest​(java.io.OutputStream out)
                          throws java.io.IOException
        Deprecated.
        Description copied from interface: RequestEntity
        Writes the request entity to the given stream.
        Specified by:
        writeRequest in interface RequestEntity
        Throws:
        java.io.IOException
      • getContentLength

        public long getContentLength()
        Deprecated.
        Description copied from interface: RequestEntity
        Gets the request entity's length. This method should return a non-negative value if the content length is known or a negative value if it is not. In the latter case the EntityEnclosingMethod will use chunk encoding to transmit the request entity.
        Specified by:
        getContentLength in interface RequestEntity
        Returns:
        The length of the content.
      • getContent

        public java.lang.String getContent()
        Deprecated.
        Returns:
        Returns the content.
      • getCharset

        public java.lang.String getCharset()
        Deprecated.
        Returns:
        Returns the charset used to convert the content to bytes. null if no charset as been specified.