View | Details | Raw Unified | Return to bug 51400
Collapse All | Expand All

(-)java/org/apache/tomcat/util/buf/C2BConverter.java (-3 / +4 lines)
Lines 21-26 Link Here
21
import java.io.OutputStream;
21
import java.io.OutputStream;
22
import java.io.OutputStreamWriter;
22
import java.io.OutputStreamWriter;
23
import java.io.UnsupportedEncodingException;
23
import java.io.UnsupportedEncodingException;
24
import java.nio.charset.Charset;
24
25
25
/** Efficient conversion of character to bytes.
26
/** Efficient conversion of character to bytes.
26
 *  
27
 *  
Lines 44-50 Link Here
44
    public C2BConverter(ByteChunk output, String encoding) throws IOException {
45
    public C2BConverter(ByteChunk output, String encoding) throws IOException {
45
        this.bb=output;
46
        this.bb=output;
46
        ios=new IntermediateOutputStream( output );
47
        ios=new IntermediateOutputStream( output );
47
        conv=new WriteConvertor( ios, encoding );
48
        conv = new WriteConvertor(ios, B2CConverter.getCharset(encoding));
48
        this.enc=encoding;
49
        this.enc=encoding;
49
    }
50
    }
50
51
Lines 168-177 Link Here
168
    
169
    
169
    /** Create a converter.
170
    /** Create a converter.
170
     */
171
     */
171
    public WriteConvertor( IntermediateOutputStream out, String enc )
172
    public WriteConvertor(IntermediateOutputStream out, Charset charset)
172
        throws UnsupportedEncodingException
173
        throws UnsupportedEncodingException
173
    {
174
    {
174
        super( out, enc );
175
        super(out, charset);
175
        ios=out;
176
        ios=out;
176
    }
177
    }
177
    
178
    

Return to bug 51400