code: public int read(char []buf, int offset, int length)
      throws IOException
    {
      for (int i = 0; i < length; i++) {
        int ch = _is.read();
  
        if (ch < 0)
          return i > 0 ? i : -1;
        else {
          buf[offset + i] = (char) ch;
        }
      }
        
      return length;
    }
docs: Reads the next character.