Code example for CharBuffer

Methods: array, position, rewind

0
     * Flush the output. 
     *  
     * @throws IOException if an I/O error occurs 
     */ 
    private void flushOutput() throws IOException { 
        if (decoderOut.position() > 0) {
            writer.write(decoderOut.array(), 0, decoderOut.position());
            decoderOut.rewind();
        } 
    } 
}