text: public int read(char[] cbuf, int off, int len) throws IOException {if (off < 0) throw new IllegalArgumentException("off < 0");if (off >= cbuf.length) throw new IllegalArgumentException("off >= cbuf.length");if (len <= 0) throw new IllegalArgumentException("len <= 0");while (!inputFinished || inputBuffer.length() > 0 || resultBuffer.length() > 0) {int retLen;if (resultBuffer.length() > 0) {retLen = outputFromResultBuffer(cbuf, off, len);if (retLen > 0) {return retLen;}}int resLen = readAndNormalizeFromInput();if (resLen > 0) {retLen = outputFromResultBuffer(cbuf, off, len);if (retLen > 0) {return retLen;}}readInputToBuffer();}return -1;}