docs: public int read(char cbuf[], int off, int len) throws IOException {
          int c = 0;
          int count = 0;
          while (count < len && (c = read())!= -1) {
              cbuf[off + count] = (char) c;
              count++;
          }
          return (count == 0 && c == -1) ? -1 : count;
      }