hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r618336 - in /httpcomponents/httpclient/trunk/module-httpmime/src: examples/org/apache/http/examples/entity/mime/ main/java/org/apache/http/entity/mime/ test/java/org/apache/http/entity/mime/
Date Mon, 04 Feb 2008 17:31:50 GMT
Author: olegk
Date: Mon Feb  4 09:31:48 2008
New Revision: 618336

URL: http://svn.apache.org/viewvc?rev=618336&view=rev
Log:
Renamed MultipartFormHttpEntity to MultipartEntity 

Added:
    httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/entity/mime/MultipartEntity.java
      - copied, changed from r618333, httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormHttpEntity.java
Removed:
    httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormHttpEntity.java
Modified:
    httpcomponents/httpclient/trunk/module-httpmime/src/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java
    httpcomponents/httpclient/trunk/module-httpmime/src/test/java/org/apache/http/entity/mime/TestMultipartFormHttpEntity.java

Modified: httpcomponents/httpclient/trunk/module-httpmime/src/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-httpmime/src/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java?rev=618336&r1=618335&r2=618336&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-httpmime/src/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java
(original)
+++ httpcomponents/httpclient/trunk/module-httpmime/src/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java
Mon Feb  4 09:31:48 2008
@@ -35,7 +35,7 @@
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.mime.MultipartFormHttpEntity;
+import org.apache.http.entity.mime.MultipartEntity;
 import org.apache.http.entity.mime.content.FileBody;
 import org.apache.http.entity.mime.content.StringBody;
 import org.apache.http.impl.client.DefaultHttpClient;
@@ -58,7 +58,7 @@
         FileBody bin = new FileBody(new File(args[0]));
         StringBody comment = new StringBody("A binary file of some kind");
 
-        MultipartFormHttpEntity reqEntity = new MultipartFormHttpEntity();
+        MultipartEntity reqEntity = new MultipartEntity();
         reqEntity.addPart("bin", bin);
         reqEntity.addPart("comment", comment);
         

Copied: httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/entity/mime/MultipartEntity.java
(from r618333, httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormHttpEntity.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/entity/mime/MultipartEntity.java?p2=httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/entity/mime/MultipartEntity.java&p1=httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormHttpEntity.java&r1=618333&r2=618336&rev=618336&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormHttpEntity.java
(original)
+++ httpcomponents/httpclient/trunk/module-httpmime/src/main/java/org/apache/http/entity/mime/MultipartEntity.java
Mon Feb  4 09:31:48 2008
@@ -53,7 +53,7 @@
  * 
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  */
-public class MultipartFormHttpEntity implements HttpEntity {
+public class MultipartEntity implements HttpEntity {
 
     /**
      * The pool of ASCII chars to be used for generating a multipart boundary.
@@ -68,7 +68,7 @@
     private long length;
     private boolean dirty;
     
-    public MultipartFormHttpEntity(
+    public MultipartEntity(
             HttpMultipartMode mode, 
             final String boundary,
             final Charset charset) {
@@ -91,11 +91,11 @@
         this.multipart.setMode(mode);
     }
 
-    public MultipartFormHttpEntity(final HttpMultipartMode mode) {
+    public MultipartEntity(final HttpMultipartMode mode) {
         this(mode, null, null);
     }
 
-    public MultipartFormHttpEntity() {
+    public MultipartEntity() {
         this(HttpMultipartMode.STRICT, null, null);
     }
 

Modified: httpcomponents/httpclient/trunk/module-httpmime/src/test/java/org/apache/http/entity/mime/TestMultipartFormHttpEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-httpmime/src/test/java/org/apache/http/entity/mime/TestMultipartFormHttpEntity.java?rev=618336&r1=618335&r2=618336&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-httpmime/src/test/java/org/apache/http/entity/mime/TestMultipartFormHttpEntity.java
(original)
+++ httpcomponents/httpclient/trunk/module-httpmime/src/test/java/org/apache/http/entity/mime/TestMultipartFormHttpEntity.java
Mon Feb  4 09:31:48 2008
@@ -39,7 +39,7 @@
 import org.apache.http.HeaderElement;
 import org.apache.http.NameValuePair;
 import org.apache.http.entity.mime.HttpMultipartMode;
-import org.apache.http.entity.mime.MultipartFormHttpEntity;
+import org.apache.http.entity.mime.MultipartEntity;
 import org.apache.http.entity.mime.content.InputStreamBody;
 import org.apache.http.entity.mime.content.StringBody;
 import org.apache.james.mime4j.util.CharsetUtil;
@@ -68,7 +68,7 @@
     }
 
     public void testExplictContractorParams() throws Exception {
-        MultipartFormHttpEntity entity = new MultipartFormHttpEntity(
+        MultipartEntity entity = new MultipartEntity(
                 HttpMultipartMode.BROWSER_COMPATIBLE,
                 "whatever",
                 CharsetUtil.getCharset("UTF-8"));
@@ -91,7 +91,7 @@
     }
     
     public void testImplictContractorParams() throws Exception {
-        MultipartFormHttpEntity entity = new MultipartFormHttpEntity();
+        MultipartEntity entity = new MultipartEntity();
         assertNull(entity.getContentEncoding());
         assertNotNull(entity.getContentType());
         Header header = entity.getContentType();
@@ -115,7 +115,7 @@
     }
     
     public void testRepeatable() throws Exception {
-        MultipartFormHttpEntity entity = new MultipartFormHttpEntity();
+        MultipartEntity entity = new MultipartEntity();
         entity.addPart("p1", new StringBody("blah blah"));
         entity.addPart("p2", new StringBody("yada yada"));
         assertTrue(entity.isRepeatable());
@@ -145,7 +145,7 @@
     }
     
     public void testNonRepeatable() throws Exception {
-        MultipartFormHttpEntity entity = new MultipartFormHttpEntity();
+        MultipartEntity entity = new MultipartEntity();
         entity.addPart("p1", new InputStreamBody(
                 new ByteArrayInputStream("blah blah".getBytes()), null));
         entity.addPart("p2", new InputStreamBody(



Mime
View raw message