@Override public DocumentRecord next() throws SqlJetException { if (next == null && !hasNext()) Log.die("Next is null"); DocumentRecord res = next; next = null; return res; }
public static SFile getNewestBackupFile(SFile backupDir) { SFile src = null; Log.d("newestBackup", "Search backup " + backupDir + " *.json"); for (SFile txt : backupDir) { if (!txt.name().endsWith(".json")) continue; if (txt.name().startsWith("dot_")) continue; if (src == null || txt.lastModified() > src.lastModified()) { src = txt; } } if (src == null) Log.die("Backup not found in " + backupDir); return src; }