cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r570209 - /incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Date Mon, 27 Aug 2007 18:17:12 GMT
Author: dkulp
Date: Mon Aug 27 11:17:11 2007
New Revision: 570209

URL: http://svn.apache.org/viewvc?rev=570209&view=rev
Log:
[CXF-936] Patch from Glen Mazza aplied.  Thanks!


Modified:
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=570209&r1=570208&r2=570209&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Mon Aug 27 11:17:11 2007
@@ -19,6 +19,7 @@
 package org.apache.cxf.transport.http;
 
 
+import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -69,7 +70,7 @@
 import org.apache.cxf.ws.policy.Assertor;
 import org.apache.cxf.ws.policy.PolicyEngine;
 import org.apache.cxf.wsdl.EndpointReferenceUtils;
-import org.apache.geronimo.mail.util.StringBufferOutputStream;
+
 
 import static org.apache.cxf.message.Message.DECOUPLED_CHANNEL_MESSAGE;
 
@@ -1586,19 +1587,16 @@
         out.close();
         
         if (LOG.isLoggable(Level.FINE)) {
-            StringBuffer sbuf = new StringBuffer();
-            StringBufferOutputStream sout =
-                new StringBufferOutputStream(sbuf);
+            ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
             CacheAndWriteOutputStream.copyStream(stream.getInputStream(), 
-                    sout, 2048);
-            sout.close();
+                    baos, 2048);
 
             LOG.fine("Conduit \""
                      + getConduitName() 
                      + "\" Retransmit message to: " 
                      + connection.getURL()
                      + ": "
-                     + sbuf);
+                     + baos.toString());
         }
         return connection;
     }
@@ -1805,18 +1803,15 @@
             if (cachedStream != null) {
 
                 if (LOG.isLoggable(Level.FINE)) {
-                    StringBuffer sbuf = new StringBuffer();
-                    StringBufferOutputStream sout =
-                        new StringBufferOutputStream(sbuf);
-                    IOUtils.copy(cachedStream.getInputStream(), sout, 2048);
-                    sout.close();
+                    ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
+                    IOUtils.copy(cachedStream.getInputStream(), baos, 2048);
 
                     LOG.fine("Conduit \""
                              + getConduitName() 
                              + "\" Transmit cached message to: " 
                              + connection.getURL()
                              + ": "
-                             + sbuf);
+                             + baos.toString());
                 }
 
                 HttpURLConnection oldcon = connection;



Mime
View raw message