commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r327791 - in /jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/multipart: MultipartRequestEntity.java Part.java
Date Sun, 23 Oct 2005 13:27:45 GMT
Author: olegk
Date: Sun Oct 23 06:27:39 2005
New Revision: 327791

URL: http://svn.apache.org/viewcvs?rev=327791&view=rev
Log:
PR #37089 (need members of MultipartRequestEntity to be "protected" instead of "private" to
make it extendable for multipart/related)

Contributed by Guillaume Cottenceau <poubelle2005 at yahoo.fr> and Ortwin Glueck
Reviewed by Oleg Kalnichevski

Modified:
    jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/multipart/MultipartRequestEntity.java
    jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/multipart/Part.java

Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/multipart/MultipartRequestEntity.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/multipart/MultipartRequestEntity.java?rev=327791&r1=327790&r2=327791&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/multipart/MultipartRequestEntity.java
(original)
+++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/multipart/MultipartRequestEntity.java
Sun Oct 23 06:27:39 2005
@@ -99,7 +99,8 @@
         return bytes;
     }
     
-    private Part[] parts;
+    /** The MIME parts as set by the constructor */
+    protected Part[] parts;
     
     private byte[] multipartBoundary;
     
@@ -121,7 +122,16 @@
         this.params = params;
     }
 
-    private byte[] getMultipartBoundary() {
+    /**
+     * Returns the MIME boundary string that is used to demarcate boundaries of
+     * this part. The first call to this method will implicitly create a new
+     * boundary string. To create a boundary string first the 
+     * HttpMethodParams.MULTIPART_BOUNDARY parameter is considered. Otherwise 
+     * a random one is generated.
+     * 
+     * @return The boundary string of this entity in ASCII encoding.
+     */
+    protected byte[] getMultipartBoundary() {
         if (multipartBoundary == null) {
             String temp = (String) params.getParameter(HttpMethodParams.MULTIPART_BOUNDARY);
             if (temp != null) {

Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/multipart/Part.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/multipart/Part.java?rev=327791&r1=327790&r2=327791&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/multipart/Part.java
(original)
+++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/multipart/Part.java
Sun Oct 23 06:27:39 2005
@@ -122,7 +122,7 @@
     /**
      * Return the boundary string.
      * @return the boundary string
-     * @deprecated 
+     * @deprecated uses a constant string. Rather use {@link #getPartBoundary}
      */
     public static String getBoundary() {
         return BOUNDARY;



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message