public int read(char cbuf[],int off,int len) throws IOException {
  if (_input == null)   throw new IOException("Reader closed");
  final int inputLength=_input.length();
  if (_index >= inputLength)   return -1;
  final int count=MathLib.min(inputLength - _index,len);
  final Object csq=_input;
  if (csq instanceof String) {
    String str=(String)csq;
    str.getChars(_index,_index + count,cbuf,off);
  }
 else   if (csq instanceof Text) {
    Text txt=(Text)csq;
    txt.getChars(_index,_index + count,cbuf,off);
  }
 else   if (csq instanceof TextBuilder) {
    TextBuilder tb=(TextBuilder)csq;
    tb.getChars(_index,_index + count,cbuf,off);
  }
 else   if (csq instanceof CharArray) {
    CharArray ca=(CharArray)csq;
    System.arraycopy(ca.array(),_index + ca.offset(),cbuf,off,count);
  }
 else {
    for (int i=off, n=off + count, j=_index; i < n; ) {
      cbuf[i++]=_input.charAt(j++);
    }
  }
  _index+=count;
  return count;
}

public int read ( char cbuf [ ] , int off , int len ) throws IOException { if ( _input == null ) throw new IOException ( "Reader closed" ) ; final int inputLength = _input . length ( ) ; if ( _index >= inputLength ) return - 1 ; final int count = MathLib . min ( inputLength - _index , len ) ; final Object csq = _input ; if ( csq instanceof String ) { String str = ( String ) csq ; str . getChars ( _index , _index + count , cbuf , off ) ; } else if ( csq instanceof Text ) { Text txt = ( Text ) csq ; txt . getChars ( _index , _index + count , cbuf , off ) ; } else if ( csq instanceof TextBuilder ) { TextBuilder tb = ( TextBuilder ) csq ; tb . getChars ( _index , _index + count , cbuf , off ) ; } else if ( csq instanceof CharArray ) { CharArray ca = ( CharArray ) csq ; System . arraycopy ( ca . array ( ) , _index + ca . offset ( ) , cbuf , off , count ) ; } else { for ( int i = off , n = off + count , j = _index ; i < n ; ) { cbuf [ i ++ ] = _input . charAt ( j ++ ) ; } } _index += count ; return count ; }
reads characters into a portion of an array . this method does not block .
