hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r617519 - in /httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime: FormBodyPart.java HttpMultipart.java RFC822Header.java
Date Fri, 01 Feb 2008 15:37:46 GMT
Author: olegk
Date: Fri Feb  1 07:37:45 2008
New Revision: 617519

URL: http://svn.apache.org/viewvc?rev=617519&view=rev
Log:
MIME multipart/form-data: added rudimentary javadocs

Modified:
    httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/FormBodyPart.java
    httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/HttpMultipart.java
    httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/RFC822Header.java

Modified: httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/FormBodyPart.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/FormBodyPart.java?rev=617519&r1=617518&r2=617519&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/FormBodyPart.java
(original)
+++ httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/FormBodyPart.java
Fri Feb  1 07:37:45 2008
@@ -36,6 +36,13 @@
 import org.apache.james.mime4j.message.BodyPart;
 import org.apache.james.mime4j.message.Header;
 
+/**
+ * An extension of the mime4j standard {@link BodyPart} class that 
+ * automatically populates the header with standard fields based 
+ * on the content description of the enclosed body.
+ * 
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ */
 public class FormBodyPart extends BodyPart {
 
     private final String name;

Modified: httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/HttpMultipart.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/HttpMultipart.java?rev=617519&r1=617518&r2=617519&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/HttpMultipart.java
(original)
+++ httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/HttpMultipart.java
Fri Feb  1 07:37:45 2008
@@ -50,9 +50,11 @@
 import org.apache.james.mime4j.util.CharsetUtil;
 
 /**
- * Extension of the mime4j standard class needed to work around 
- * some formatting issues in the {@link Multipart#writeTo(OutputStream)}
- * method until they have been addressed downstream.
+ * An extension of the mime4j standard {@link Multipart} class, which is
+ * capable of operating either in the strict (fully RFC 822, RFC 2045, 
+ * RFC 2046 compliant) or the browser compatible modes.
+ * 
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  */
 public class HttpMultipart extends Multipart {
 
@@ -170,11 +172,31 @@
         }
     }
 
+    /**
+     * Writes out the content in the multipart/form encoding. This method 
+     * produces slightly different formatting depending on its compatibility 
+     * mode.
+     * 
+     * @see #getMode()
+     */
     @Override
     public void writeTo(final OutputStream out) throws IOException {
         writeTo(out, true);
     }
-    
+
+    /**
+     * Determines the total length of the multipart content (content length of 
+     * individual parts plus that of extra elements required to delimit the parts 
+     * from one another). If any of the @{link BodyPart}s contained in this object 
+     * is of a streaming entity of unknown length the total length is also unknown.
+     * <p/>
+     * This method buffers only a small amount of data in order to determine the
+     * total length of the entire entity. The content of individual parts is not 
+     * buffered.  
+     * 
+     * @return total length of the multipart entity if known, <code>-1</code>

+     *   otherwise.
+     */
     public long getTotalLength() {
         List<?> bodyParts = getBodyParts();
 

Modified: httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/RFC822Header.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/RFC822Header.java?rev=617519&r1=617518&r2=617519&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/RFC822Header.java
(original)
+++ httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/client/mime/RFC822Header.java
Fri Feb  1 07:37:45 2008
@@ -39,6 +39,10 @@
 
 import org.apache.james.mime4j.message.Header;
 
+/**
+ * {@link Header} implementation with the stricter RDC 822 compliance.
+ * To be removed if resolved in mime4j.
+ */
 class RFC822Header extends Header {
 
     @Override



Mime
View raw message