Save This Page
Home » commons-httpclient-3.1-src » org.apache.commons » httpclient » methods » [javadoc | source]
org.apache.commons.httpclient.methods
public class: StringRequestEntity [javadoc | source]
java.lang.Object
   org.apache.commons.httpclient.methods.StringRequestEntity

All Implemented Interfaces:
    RequestEntity

A RequestEntity that contains a String.
Constructor:
 public StringRequestEntity(String content) 

    Creates a new entity with the given content. This constructor will use the default platform charset to convert the content string and will provide no content type.

 public StringRequestEntity(String content,
    String contentType,
    String charset) throws UnsupportedEncodingException 
    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.
Method from org.apache.commons.httpclient.methods.StringRequestEntity Summary:
getCharset,   getContent,   getContentLength,   getContentType,   isRepeatable,   writeRequest
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.httpclient.methods.StringRequestEntity Detail:
 public String getCharset() 
 public String getContent() 
 public long getContentLength() 
 public String getContentType() 
 public boolean isRepeatable() 
 public  void writeRequest(OutputStream out) throws IOException