title: Get all rows from SQLite
body: <p>I have been trying to get all rows from the SQLite database. But I got only last row from the following codes. </p>
  
  <p><strong>FileChooser class:</strong></p>
  
  <pre><code>public ArrayList&lt;String&gt; readFileFromSQLite() {
  
    fileName = new ArrayList&lt;String&gt;();
  
    fileSQLiteAdapter = new FileSQLiteAdapter(FileChooser.this);
    fileSQLiteAdapter.openToRead();
    cursor = fileSQLiteAdapter.queueAll();
  
    if (cursor != null) {
      if (cursor.moveToFirst()) {
        do {
          fileName.add(cursor.getString(cursor.getColumnIndex(FileSQLiteAdapter.KEY_CONTENT1)));
        } while (cursor.moveToNext());
  
      }
      cursor.close();
    }
  
    fileSQLiteAdapter.close();
    return fileName;
  }
  </code></pre>
  
  <p><strong>FileSQLiteAdapter class:</strong></p>
  
  <pre><code>public Cursor queueAll() {
    String[] columns = new String[] { KEY_ID, KEY_CONTENT1 };
  
    Cursor cursor = sqLiteDatabase.query(MYDATABASE_TABLE, columns, null,
                  null, null, null, null);
    return cursor;
  }
  </code></pre>
  
  <p>Please tell me where is my incorrect. Appreciate.</p>