public String parse(String s) { Log.d(this, "Parsing " + s); SimpleJSParser simpleJSParser = new SimpleJSParser(s); simpleJSParser.parse(); String res = simpleJSParser.buf + ""; Log.d(this, "Returned " + res); 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; }
@Override public DocumentRecord next() throws SqlJetException { if (next == null && !hasNext()) Log.die("Next is null"); DocumentRecord res = next; next = null; return res; }