code: public static String[] allStrings(Cursor cursor, boolean close) {
          String[] s = EMPTY_STRING_ARRAY;
          if (cursor.moveToFirst()) {
              s = new String[cursor.getCount()];
              do {
                  s[cursor.getPosition()] = cursor.getString(0);
              } while (cursor.moveToNext());
          }
          close(cursor, close);
          return s;
      }
docs: Get all String values in the first column.
  
  @param close true to close the cursor or false to leave it open