You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2012/10/12 20:34:54 UTC

svn commit: r1397674 - /httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java

Author: olegk
Date: Fri Oct 12 18:34:54 2012
New Revision: 1397674

URL: http://svn.apache.org/viewvc?rev=1397674&view=rev
Log:
Added constructor to SerializableEntity

Modified:
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java?rev=1397674&r1=1397673&r2=1397674&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java Fri Oct 12 18:34:54 2012
@@ -71,6 +71,15 @@ public class SerializableEntity extends 
         }
     }
 
+    /**
+     * @since 4.3
+     */
+    public SerializableEntity(Serializable ser) {
+        super();
+        Args.notNull(ser, "Source object");
+        this.objRef = ser;
+    }
+
     private void createBytes(Serializable ser) throws IOException {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream(baos);