Code example for CharsetDecoder

Methods: maxCharsPerByte

0
            throw msg.parameterOutOfRange("bufferSize"); 
        } 
        this.writer = writer;
        this.decoder = decoder;
        byteBuffer = ByteBuffer.allocate(bufferSize);
        chars = new char[(int) ((float)bufferSize * decoder.maxCharsPerByte() + 0.5f)];
    } 
 
    /** 
     * Construct a new instance. 
     * 
     * @param writer the writer to decode into 
     * @param charset the character set to use 
     */ 
    public WriterOutputStream(final Writer writer, final Charset charset) {
        this(writer, getDecoder(charset));
    } 
 
    /** 
     * Construct a new instance.