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

@ 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 ; }
reads into a character buffer using the correct encoding .
