Code example for CharBuffer

Methods: positionrewindarray

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();
        } 
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java