hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r385774 - in /jakarta/httpcomponents/trunk/http-core/src: java/org/apache/http/entity/ java/org/apache/http/impl/ java/org/apache/http/impl/entity/ test/org/apache/http/impl/
Date Tue, 14 Mar 2006 09:32:05 GMT
Author: olegk
Date: Tue Mar 14 01:32:03 2006
New Revision: 385774

URL: http://svn.apache.org/viewcvs?rev=385774&view=rev
Log:
Renamed EntityWriter to EntitySerializer and EntityGenerator to EntityDeserializer

Added:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityDeserializer.java
      - copied, changed from r385290, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityGenerator.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java
      - copied, changed from r385290, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityWriter.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java
  (contents, props changed)
      - copied, changed from r385290, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntityWriter.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityDeserializer.java
      - copied, changed from r385290, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityGenerator.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java
  (contents, props changed)
      - copied, changed from r385290, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntityWriter.java
    jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityDeserializer.java
      - copied, changed from r385290, jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityGenerator.java
Removed:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityGenerator.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityWriter.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntityWriter.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityGenerator.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntityWriter.java
    jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityGenerator.java
Modified:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
    jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAllImpl.java

Copied: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityDeserializer.java
(from r385290, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityGenerator.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityDeserializer.java?p2=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityDeserializer.java&p1=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityGenerator.java&r1=385290&r2=385774&rev=385774&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityGenerator.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityDeserializer.java
Tue Mar 14 01:32:03 2006
@@ -45,7 +45,7 @@
  * 
  * @since 4.0
  */
-public interface EntityGenerator {
+public interface EntityDeserializer {
 
     HttpEntity generate(
             HttpDataReceiver datareceiver,

Copied: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java
(from r385290, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityWriter.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java?p2=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java&p1=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityWriter.java&r1=385290&r2=385774&rev=385774&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityWriter.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java
Tue Mar 14 01:32:03 2006
@@ -45,7 +45,7 @@
  * 
  * @since 4.0
  */
-public interface EntityWriter {
+public interface EntitySerializer {
 
     void write(
             HttpEntity entity,

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java?rev=385774&r1=385773&r2=385774&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
Tue Mar 14 01:32:03 2006
@@ -46,10 +46,10 @@
 import org.apache.http.ProtocolException;
 import org.apache.http.RequestLine;
 import org.apache.http.StatusLine;
-import org.apache.http.entity.EntityGenerator;
-import org.apache.http.entity.EntityWriter;
-import org.apache.http.impl.entity.DefaultClientEntityWriter;
-import org.apache.http.impl.entity.DefaultEntityGenerator;
+import org.apache.http.entity.EntityDeserializer;
+import org.apache.http.entity.EntitySerializer;
+import org.apache.http.impl.entity.DefaultClientEntitySerializer;
+import org.apache.http.impl.entity.DefaultEntityDeserializer;
 import org.apache.http.io.CharArrayBuffer;
 import org.apache.http.io.SocketFactory;
 import org.apache.http.params.HttpParams;
@@ -77,8 +77,8 @@
      * Dependent interfaces
      */
     private HttpResponseFactory responsefactory = null;
-    private EntityGenerator entitygen = null;
-    private EntityWriter entitywriter = null;
+    private EntitySerializer entityserializer = null;
+    private EntityDeserializer entitydeserializer = null;
     
     public DefaultHttpClientConnection(final HttpHost targethost, final InetAddress localAddress)
{
         super();
@@ -86,8 +86,8 @@
         this.localAddress = localAddress;
         this.buffer = new CharArrayBuffer(128);
         this.responsefactory = new DefaultHttpResponseFactory();
-        this.entitygen = new DefaultEntityGenerator();
-        this.entitywriter = new DefaultClientEntityWriter();
+        this.entityserializer = new DefaultClientEntitySerializer();
+        this.entitydeserializer = new DefaultEntityDeserializer();
     }
     
     public DefaultHttpClientConnection(final HttpHost targethost) {
@@ -105,18 +105,18 @@
         this.responsefactory = responsefactory;
     }
 
-    public void setEntityGenerator(final EntityGenerator entitygen) {
-        if (entitygen == null) {
-            throw new IllegalArgumentException("Entity generator may not be null");
+    public void setEntityDeserializer(final EntityDeserializer entitydeserializer) {
+        if (entitydeserializer == null) {
+            throw new IllegalArgumentException("Entity deserializer may not be null");
         }
-        this.entitygen = entitygen;
+        this.entitydeserializer = entitydeserializer;
     }
 
-    public void setEntityWriter(final EntityWriter entitywriter) {
-        if (entitywriter == null) {
-            throw new IllegalArgumentException("Entity writer may not be null");
+    public void setEntitySerializer(final EntitySerializer entityserializer) {
+        if (entityserializer == null) {
+            throw new IllegalArgumentException("Entity serializer may not be null");
         }
-        this.entitywriter = entitywriter;
+        this.entityserializer = entityserializer;
     }
 
     public void open(final HttpParams params) throws IOException {
@@ -180,7 +180,7 @@
         if (request.getEntity() == null) {
             return;
         }
-        this.entitywriter.write(
+        this.entityserializer.write(
                 request.getEntity(),
                 request.getRequestLine().getHttpVersion(),
                 this.datatransmitter);
@@ -226,7 +226,7 @@
             throw new IllegalArgumentException("HTTP response may not be null");
         }
         assertOpen();
-        HttpEntity entity = this.entitygen.generate(this.datareceiver, response);
+        HttpEntity entity = this.entitydeserializer.generate(this.datareceiver, response);
         response.setEntity(entity);
     }
     

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java?rev=385774&r1=385773&r2=385774&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
Tue Mar 14 01:32:03 2006
@@ -43,10 +43,10 @@
 import org.apache.http.HttpServerConnection;
 import org.apache.http.RequestLine;
 import org.apache.http.StatusLine;
-import org.apache.http.entity.EntityGenerator;
-import org.apache.http.entity.EntityWriter;
-import org.apache.http.impl.entity.DefaultEntityGenerator;
-import org.apache.http.impl.entity.DefaultServerEntityWriter;
+import org.apache.http.entity.EntityDeserializer;
+import org.apache.http.entity.EntitySerializer;
+import org.apache.http.impl.entity.DefaultEntityDeserializer;
+import org.apache.http.impl.entity.DefaultServerEntitySerializer;
 import org.apache.http.io.CharArrayBuffer;
 import org.apache.http.params.HttpParams;
 
@@ -68,15 +68,15 @@
      * Dependent interfaces
      */
     private HttpRequestFactory requestfactory = null; 
-    private EntityGenerator entitygen = null;
-    private EntityWriter entitywriter = null;
+    private EntitySerializer entityserializer = null;
+    private EntityDeserializer entitydeserializer = null;
 
     public DefaultHttpServerConnection() {
         super();
         this.requestfactory = new DefaultHttpRequestFactory();
         this.buffer = new CharArrayBuffer(128);
-        this.entitygen = new DefaultEntityGenerator();
-        this.entitywriter = new DefaultServerEntityWriter();
+        this.entityserializer = new DefaultServerEntitySerializer();
+        this.entitydeserializer = new DefaultEntityDeserializer();
     }
     
     public void setRequestFactory(final HttpRequestFactory requestfactory) {
@@ -86,18 +86,18 @@
         this.requestfactory = requestfactory;
     }
 
-    public void setEntityGenerator(final EntityGenerator entitygen) {
-        if (entitygen == null) {
-            throw new IllegalArgumentException("Entity generator may not be null");
+    public void setEntityDeserializer(final EntityDeserializer entitydeserializer) {
+        if (entitydeserializer == null) {
+            throw new IllegalArgumentException("Entity deserializer may not be null");
         }
-        this.entitygen = entitygen;
+        this.entitydeserializer = entitydeserializer;
     }
 
-    public void setEntityWriter(final EntityWriter entitywriter) {
-        if (entitywriter == null) {
-            throw new IllegalArgumentException("Entity writer may not be null");
+    public void setEntitySerializer(final EntitySerializer entityserializer) {
+        if (entityserializer == null) {
+            throw new IllegalArgumentException("Entity serializer may not be null");
         }
-        this.entitywriter = entitywriter;
+        this.entityserializer = entityserializer;
     }
 
     public void bind(final Socket socket, final HttpParams params) throws IOException {
@@ -121,7 +121,7 @@
             throw new IllegalArgumentException("HTTP request may not be null");
         }
         assertOpen();
-        HttpEntity entity = this.entitygen.generate(this.datareceiver, request);
+        HttpEntity entity = this.entitydeserializer.generate(this.datareceiver, request);
         request.setEntity(entity);
     }
 
@@ -166,7 +166,7 @@
         if (response.getEntity() == null) {
             return;
         }
-        this.entitywriter.write(
+        this.entityserializer.write(
                 response.getEntity(),
                 response.getStatusLine().getHttpVersion(),
                 this.datatransmitter);

Copied: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java
(from r385290, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntityWriter.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java?p2=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java&p1=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntityWriter.java&r1=385290&r2=385774&rev=385774&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntityWriter.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java
Tue Mar 14 01:32:03 2006
@@ -1,7 +1,7 @@
 /*
- * $HeadURL: $
- * $Revision: $
- * $Date: $
+ * $HeadURL$
+ * $Revision$
+ * $Date$
  *
  * ====================================================================
  *
@@ -36,7 +36,7 @@
 import org.apache.http.HttpException;
 import org.apache.http.HttpVersion;
 import org.apache.http.ProtocolException;
-import org.apache.http.entity.EntityWriter;
+import org.apache.http.entity.EntitySerializer;
 import org.apache.http.io.ChunkedOutputStream;
 import org.apache.http.io.ContentLengthOutputStream;
 import org.apache.http.io.HttpDataTransmitter;
@@ -50,9 +50,9 @@
  * 
  * @since 4.0
  */
-public class DefaultClientEntityWriter implements EntityWriter {
+public class DefaultClientEntitySerializer implements EntitySerializer {
 
-    public DefaultClientEntityWriter() {
+    public DefaultClientEntitySerializer() {
         super();
     }
 

Propchange: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityDeserializer.java
(from r385290, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityGenerator.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityDeserializer.java?p2=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityDeserializer.java&p1=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityGenerator.java&r1=385290&r2=385774&rev=385774&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityGenerator.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityDeserializer.java
Tue Mar 14 01:32:03 2006
@@ -38,7 +38,7 @@
 import org.apache.http.HttpEntity;
 import org.apache.http.ProtocolException;
 import org.apache.http.entity.BasicHttpEntity;
-import org.apache.http.entity.EntityGenerator;
+import org.apache.http.entity.EntityDeserializer;
 import org.apache.http.io.ChunkedInputStream;
 import org.apache.http.io.ContentLengthInputStream;
 import org.apache.http.io.HttpDataInputStream;
@@ -185,9 +185,9 @@
  * 
  * @since 4.0
  */
-public class DefaultEntityGenerator implements EntityGenerator {
+public class DefaultEntityDeserializer implements EntityDeserializer {
 
-    public DefaultEntityGenerator() {
+    public DefaultEntityDeserializer() {
         super();
     }
 

Copied: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java
(from r385290, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntityWriter.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java?p2=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java&p1=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntityWriter.java&r1=385290&r2=385774&rev=385774&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntityWriter.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java
Tue Mar 14 01:32:03 2006
@@ -1,7 +1,7 @@
 /*
- * $HeadURL: $
- * $Revision: $
- * $Date: $
+ * $HeadURL$
+ * $Revision$
+ * $Date$
  *
  * ====================================================================
  *
@@ -35,7 +35,7 @@
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpException;
 import org.apache.http.HttpVersion;
-import org.apache.http.entity.EntityWriter;
+import org.apache.http.entity.EntitySerializer;
 import org.apache.http.io.ChunkedOutputStream;
 import org.apache.http.io.ContentLengthOutputStream;
 import org.apache.http.io.HttpDataTransmitter;
@@ -50,9 +50,9 @@
  * 
  * @since 4.0
  */
-public class DefaultServerEntityWriter implements EntityWriter {
+public class DefaultServerEntitySerializer implements EntitySerializer {
 
-    public DefaultServerEntityWriter() {
+    public DefaultServerEntitySerializer() {
         super();
     }
 

Propchange: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAllImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAllImpl.java?rev=385774&r1=385773&r2=385774&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAllImpl.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAllImpl.java
Tue Mar 14 01:32:03 2006
@@ -41,7 +41,7 @@
         suite.addTest(TestHeaderGroup.suite());
         suite.addTest(TestHttpDataReceiverAndTransmitter.suite());
         suite.addTest(TestDefaultConnectionReuseStrategy.suite());
-        suite.addTest(TestDefaultEntityGenerator.suite());
+        suite.addTest(TestDefaultEntityDeserializer.suite());
         suite.addTest(TestBasicRequest.suite());
         return suite;
     }

Copied: jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityDeserializer.java
(from r385290, jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityGenerator.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityDeserializer.java?p2=jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityDeserializer.java&p1=jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityGenerator.java&r1=385290&r2=385774&rev=385774&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityGenerator.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityDeserializer.java
Tue Mar 14 01:32:03 2006
@@ -34,8 +34,8 @@
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpMessage;
 import org.apache.http.ProtocolException;
-import org.apache.http.entity.EntityGenerator;
-import org.apache.http.impl.entity.DefaultEntityGenerator;
+import org.apache.http.entity.EntityDeserializer;
+import org.apache.http.impl.entity.DefaultEntityDeserializer;
 import org.apache.http.io.ChunkedInputStream;
 import org.apache.http.io.ContentLengthInputStream;
 import org.apache.http.io.HttpDataInputStream;
@@ -48,26 +48,26 @@
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-public class TestDefaultEntityGenerator extends TestCase {
+public class TestDefaultEntityDeserializer extends TestCase {
 
-    public TestDefaultEntityGenerator(String testName) {
+    public TestDefaultEntityDeserializer(String testName) {
         super(testName);
     }
 
     // ------------------------------------------------------- TestCase Methods
 
     public static Test suite() {
-        return new TestSuite(TestDefaultEntityGenerator.class);
+        return new TestSuite(TestDefaultEntityDeserializer.class);
     }
 
     // ------------------------------------------------------------------- Main
     public static void main(String args[]) {
-        String[] testCaseName = { TestDefaultEntityGenerator.class.getName() };
+        String[] testCaseName = { TestDefaultEntityDeserializer.class.getName() };
         junit.textui.TestRunner.main(testCaseName);
     }
 
     public void testIllegalGenerateArg() throws Exception {
-        EntityGenerator entitygen = new DefaultEntityGenerator();
+        EntityDeserializer entitygen = new DefaultEntityDeserializer();
         try {
             entitygen.generate(null, null);
             fail("IllegalArgumentException should have been thrown");
@@ -91,7 +91,7 @@
         message.addHeader(new Header("Content-Type", "unknown"));
         message.addHeader(new Header("Transfer-Encoding", "identity, chunked"));
         message.addHeader(new Header("Content-Length", "plain wrong"));
-        EntityGenerator entitygen = new DefaultEntityGenerator();
+        EntityDeserializer entitygen = new DefaultEntityDeserializer();
         HttpEntity entity = entitygen.generate(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
@@ -117,7 +117,7 @@
         message.addHeader(new Header("Content-Type", "unknown"));
         message.addHeader(new Header("Transfer-Encoding", "identity"));
         message.addHeader(new Header("Content-Length", "plain wrong"));
-        EntityGenerator entitygen = new DefaultEntityGenerator();
+        EntityDeserializer entitygen = new DefaultEntityDeserializer();
         HttpEntity entity = entitygen.generate(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
@@ -133,7 +133,7 @@
         message.addHeader(new Header("Content-Type", "unknown"));
         message.addHeader(new Header("Transfer-Encoding", "whatever; param=value, chunked"));
         message.addHeader(new Header("Content-Length", "plain wrong"));
-        EntityGenerator entitygen = new DefaultEntityGenerator();
+        EntityDeserializer entitygen = new DefaultEntityDeserializer();
         HttpEntity entity = entitygen.generate(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
@@ -159,7 +159,7 @@
         message.addHeader(new Header("Content-Type", "unknown"));
         message.addHeader(new Header("Transfer-Encoding", "chunked, identity"));
         message.addHeader(new Header("Content-Length", "plain wrong"));
-        EntityGenerator entitygen = new DefaultEntityGenerator();
+        EntityDeserializer entitygen = new DefaultEntityDeserializer();
         HttpEntity entity = entitygen.generate(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
@@ -184,7 +184,7 @@
         message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING,
false);
         message.addHeader(new Header("Content-Type", "unknown"));
         message.addHeader(new Header("Content-Length", "0"));
-        EntityGenerator entitygen = new DefaultEntityGenerator();
+        EntityDeserializer entitygen = new DefaultEntityDeserializer();
         HttpEntity entity = entitygen.generate(datareceiver, message);
         assertNotNull(entity);
         assertEquals(0, entity.getContentLength());
@@ -202,7 +202,7 @@
         message.addHeader(new Header("Content-Length", "0"));
         message.addHeader(new Header("Content-Length", "0"));
         message.addHeader(new Header("Content-Length", "1"));
-        EntityGenerator entitygen = new DefaultEntityGenerator();
+        EntityDeserializer entitygen = new DefaultEntityDeserializer();
         HttpEntity entity = entitygen.generate(datareceiver, message);
         assertNotNull(entity);
         assertEquals(1, entity.getContentLength());
@@ -231,7 +231,7 @@
         message.addHeader(new Header("Content-Length", "1"));
         message.addHeader(new Header("Content-Length", "yyy"));
         message.addHeader(new Header("Content-Length", "xxx"));
-        EntityGenerator entitygen = new DefaultEntityGenerator();
+        EntityDeserializer entitygen = new DefaultEntityDeserializer();
         HttpEntity entity = entitygen.generate(datareceiver, message);
         assertNotNull(entity);
         assertEquals(1, entity.getContentLength());
@@ -259,7 +259,7 @@
         message.addHeader(new Header("Content-Type", "unknown"));
         message.addHeader(new Header("Content-Length", "yyy"));
         message.addHeader(new Header("Content-Length", "xxx"));
-        EntityGenerator entitygen = new DefaultEntityGenerator();
+        EntityDeserializer entitygen = new DefaultEntityDeserializer();
         HttpEntity entity = entitygen.generate(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
@@ -287,7 +287,7 @@
         message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING,
false);
         message.addHeader(new Header("Content-Type", "unknown"));
         message.addHeader(new Header("Content-Length", "xxx"));
-        EntityGenerator entitygen = new DefaultEntityGenerator();
+        EntityDeserializer entitygen = new DefaultEntityDeserializer();
         HttpEntity entity = entitygen.generate(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
@@ -313,7 +313,7 @@
 
         // lenient mode 
         message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING,
false);
-        EntityGenerator entitygen = new DefaultEntityGenerator();
+        EntityDeserializer entitygen = new DefaultEntityDeserializer();
         HttpEntity entity = entitygen.generate(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());



Mime
View raw message