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