[jboss-remoting-commits] JBoss Remoting SVN: r4537 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Sun Sep 7 00:34:45 EDT 2008


Author: ron.sigal at jboss.com
Date: 2008-09-07 00:34:45 -0400 (Sun, 07 Sep 2008)
New Revision: 4537

Modified:
   remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/OutputBuffer.java
Log:
JBREM-1033: Treatment of C2BConverter changed to conform to jbossweb 2.1.

Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/OutputBuffer.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/OutputBuffer.java	2008-09-07 04:28:58 UTC (rev 4536)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/OutputBuffer.java	2008-09-07 04:34:45 UTC (rev 4537)
@@ -605,8 +605,14 @@
          setConverter();
       }
 
-      conv.convert(c, off, len);
-      conv.flushBuffer();   // ???
+      // The following has been updated to conform to jbossweb 2.1.
+      cb.setChars(c, off, len);
+      while (cb.getLength() > 0) { 
+          conv.convert(cb, bb);
+          if (cb.getLength() > 0) {
+              bb.flushBuffer();
+          }
+      }
 
    }
 
@@ -638,6 +644,8 @@
          enc = DEFAULT_ENCODING;
       }
       conv = (C2BConverter) encoders.get(enc);
+      
+      // The following has been updated to conform to jbossweb 2.1.
       if(conv == null)
       {
 
@@ -651,7 +659,7 @@
 
                         public Object run() throws IOException
                         {
-                           return new C2BConverter(bb, enc);
+                           return new C2BConverter(enc);
                         }
 
                      }
@@ -668,7 +676,7 @@
          }
          else
          {
-            conv = new C2BConverter(bb, enc);
+            conv = new C2BConverter(enc);
          }
 
          encoders.put(enc, conv);




More information about the jboss-remoting-commits mailing list