text: public CharArrayReader(char[] buf, int offset, int length) {if (offset < 0 || offset > buf.length || length < 0 || offset + length < 0) {throw new IllegalArgumentException();}this.buf = buf;this.pos = offset;this.markedPos = offset;int bufferLength = buf.length;this.count = offset + length < bufferLength ? length : bufferLength;}