You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/06/28 18:06:33 UTC

svn commit: r1140699 - /tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java

Author: markt
Date: Tue Jun 28 16:06:32 2011
New Revision: 1140699

URL: http://svn.apache.org/viewvc?rev=1140699&view=rev
Log:
More https://issues.apache.org/bugzilla/show_bug.cgi?id=51400 related changes
Based on a patch by Konstantin Preißer

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java?rev=1140699&r1=1140698&r2=1140699&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java Tue Jun 28 16:06:32 2011
@@ -20,7 +20,7 @@ package org.apache.tomcat.util.buf;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
 
 /** Efficient conversion of character to bytes.
  *  
@@ -44,7 +44,7 @@ public final class C2BConverter {
     public C2BConverter(ByteChunk output, String encoding) throws IOException {
         this.bb=output;
         ios=new IntermediateOutputStream( output );
-        conv=new WriteConvertor( ios, encoding );
+        conv=new WriteConvertor( ios, B2CConverter.getCharset(encoding));
         this.enc=encoding;
     }
 
@@ -168,10 +168,8 @@ public final class C2BConverter {
     
     /** Create a converter.
      */
-    public WriteConvertor( IntermediateOutputStream out, String enc )
-        throws UnsupportedEncodingException
-    {
-        super( out, enc );
+    public WriteConvertor(IntermediateOutputStream out, Charset charset) {
+        super(out, charset);
         ios=out;
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org