public static void main(String[] args) { Display display = new Display(); AddressBook application = new AddressBook(); Shell shell = application.open(display); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
public static void main(String[] args) throws Exception { Date dteTemp; SimpleDateFormat sdfTemp = new SimpleDateFormat("yyyy_MM_dd-E-hh:mm:ss_a"); AddressBook adbContacts = new AddressBook(); String strTempName; String strTempVMID; String strTempVMTS; Class.forName("org.sqlite.JDBC"); Connection conn = DriverManager.getConnection( "jdbc:sqlite:" + System.getenv("HOME") + "/iPhone_fake/Voicemail/voicemail.db"); Statement stat = conn.createStatement(); ResultSet rs = stat.executeQuery("SELECT * FROM voicemail ORDER BY date;"); while (rs.next()) { strTempVMID = rs.getString("ROWID"); dteTemp = SQLLiteData.convertDate(rs.getString("date")); strTempVMTS = sdfTemp.format(dteTemp); strTempName = adbContacts.lookupContact(rs.getString("sender")); createContactDir(strTempName); moveVoicemail(strTempName, strTempVMID, strTempVMTS); // dteTemp = SQLLiteData.convertDate(rs.getString("expiration")); // System.out.print(sdfTemp.format(dteTemp) + " "); // System.out.print(adbContacts.lookupContact(rs.getString("callback_num")) // + " "); // System.out.print(rs.getString("duration") + " "); // System.out.print(rs.getString("flags") + " "); // System.out.println(); } stat.close(); rs.close(); conn.close(); }