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;}

public override int Read(char[] cbuf, int off, int len){if (off < 0) throw new ArgumentException("off < 0");if (off >= cbuf.Length) throw new ArgumentException("off >= cbuf.length");if (len <= 0) throw new ArgumentException("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 0; }
