code: @Override
    public int read(char []cbuf, int off, int len)
      throws IOException
    {
      int i = 0;
  
      InputStream is = _is;
      if (is == null)
        return -1;
      
      for (i = 0; i < len; i++) {
        if (i > 0 && is.available() < 1)
          return i;
        
        int ch = read();
  
        if (ch < 0)
          return i == 0 ? -1 : i;
  
        cbuf[off + i] = (char) ch;
      }
  
      return i;
    }
docs: Reads into a character buffer using the correct encoding.
  
  @param cbuf character buffer receiving the data.
  @param off starting offset into the buffer.
  @param len number of characters to read.
  
  @return the number of characters read or -1 on end of file.