hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1049767 - /httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java
Date Thu, 16 Dec 2010 01:47:43 GMT
Author: sebb
Date: Thu Dec 16 01:47:43 2010
New Revision: 1049767

URL: http://svn.apache.org/viewvc?rev=1049767&view=rev
Log:
Javadoc

Modified:
    httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java

Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java?rev=1049767&r1=1049766&r2=1049767&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java
(original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java
Thu Dec 16 01:47:43 2010
@@ -76,6 +76,15 @@ public class StringBody extends Abstract
         return create(text, null, null);
     }
 
+    /**
+     * Create a StringBody from the specified text, mime type and character set.
+     * 
+     * @param text to be used for the body, not {@code null}
+     * @param mimeType the mime type, may be {@code null}
+     * @param charset the character set, may be {@code null}, in which case the hosts default
charset is used
+     * @throws UnsupportedEncodingException
+     * @throws IllegalArgumentException if the {@code text} parameter is null
+     */
     public StringBody(
             final String text,
             final String mimeType,
@@ -91,10 +100,28 @@ public class StringBody extends Abstract
         this.charset = charset;
     }
 
+    /**
+     * Create a StringBody from the specified text and character set.
+     * The mime type is set to "text/plain".
+     * 
+     * @param text to be used for the body, not {@code null}
+     * @param charset the character set, may be {@code null}, in which case the hosts default
charset is used
+     * @throws UnsupportedEncodingException
+     * @throws IllegalArgumentException if the {@code text} parameter is null
+     */
     public StringBody(final String text, final Charset charset) throws UnsupportedEncodingException
{
         this(text, "text/plain", charset);
     }
 
+    /**
+     * Create a StringBody from the specified text.
+     * The mime type is set to "text/plain".
+     * The hosts default charset is used.
+     * 
+     * @param text to be used for the body, not {@code null}
+     * @throws UnsupportedEncodingException
+     * @throws IllegalArgumentException if the {@code text} parameter is null
+     */
     public StringBody(final String text) throws UnsupportedEncodingException {
         this(text, "text/plain", null);
     }



Mime
View raw message