Code example for CharsetDecoder

Methods: reset

0
	} 
	 
	@Override 
	public void close() throws IOException {
		rbc.close();
		cd.reset();
	} 
 
	@Override 
	public int read(char[] cbuf, int off, int len) throws IOException {
		if ((off < 0) || (off > cbuf.length) || (len < 0) ||
            ((off + len) > cbuf.length) || ((off + len) < 0)) {
            throw new IndexOutOfBoundsException();
        } else if (len == 0) {
            return 0; 
        } 
		while (!done && !cb.hasRemaining()) {
			int read = 0;
			int pos = bb.position();
	    	while ((read = rbc.read(bb)) == 0) {