@Override public int read(char b[],int off,int len) throws IOException {
  ensureOpen();
  if ((off < 0) || (off > b.length) || (len < 0)|| ((off + len) > b.length)|| ((off + len) < 0)) {
    throw new IndexOutOfBoundsException();
  }
 else   if (len == 0) {
    return 0;
  }
  if (pos >= count) {
    return -1;
  }
  if (pos + len > count) {
    len=count - pos;
  }
  if (len <= 0) {
    return 0;
  }
  System.arraycopy(buf,pos,b,off,len);
  pos+=len;
  return len;
}

@ Override public int read ( char b [ ] , int off , int len ) throws IOException { ensureOpen ( ) ; if ( ( off < 0 ) || ( off > b . length ) || ( len < 0 ) || ( ( off + len ) > b . length ) || ( ( off + len ) < 0 ) ) { throw new IndexOutOfBoundsException ( ) ; } else if ( len == 0 ) { return 0 ; } if ( pos >= count ) { return - 1 ; } if ( pos + len > count ) { len = count - pos ; } if ( len <= 0 ) { return 0 ; } System . arraycopy ( buf , pos , b , off , len ) ; pos += len ; return len ; }
reads characters into a portion of an array .
