code: public ArrayList<V> toArrayList (int maxElements)
          throws SQLException
      {
          ArrayList<V> al = new ArrayList<V>(Math.min(maxElements, 100));
          V o;
          while (--maxElements >= 0 && (o = next()) != null) {
              al.add(o);
          }
          return al;
      }
docs: Extracts no more than <I>maxElements</I> records from database and store
  them into array. It is possible to extract rest records by successive
  next() or toArray() calls. Selected objects should have now components
  of InputStream, Blob or Clob type, because their data will be not
  available after fetching next record.
  
  @param maxElements limitation for result array size (and also for number
  of fetched records)
  @return List with objects constructed from fetched records.