public boolean csvBigFu40Export(ArrayList<LN40> list, String exportFullPath) { try { System.out.println("csvBigFu40Export"); FileWriter writer = new FileWriter(exportFullPath); for (LN40 lotteryNum : list) { writer.append(lotteryNum.CSVLine()); } writer.flush(); writer.close(); return true; } catch (Exception e) { // TODO: handle exception System.out.println(e.getMessage()); return false; } }
public void run() { for (; ; ) { try { Thread.sleep(1000 * 30); Calendar now = Calendar.getInstance(); int hourOfNow = now.get(Calendar.HOUR_OF_DAY); int minuteOfNow = now.get(Calendar.MINUTE); System.out.println("Not yet " + hourOfNow + ":" + minuteOfNow); if (hourOfNow == 22 && minuteOfNow == 10) { this.parse(); System.out.println("downloaded!!!!"); } } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } } }
public boolean csv539Export(ArrayList<LN539> listOf539, String exportFullPath) { try { System.out.println("csv539Export : " + exportFullPath); // FileWriter writer = new FileWriter(exportFullPath,true); FileOutputStream outputstream = new FileOutputStream(new File(exportFullPath)); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputstream, "UTF-8"); String outputcontent = new String(); for (LN539 lotteryNum : listOf539) { outputcontent += lotteryNum.CSVLine(); } outputStreamWriter.write(outputcontent); outputStreamWriter.flush(); outputStreamWriter.close(); return true; } catch (Exception e) { // TODO: handle exception System.out.println("539CSV Export Error : " + e.getMessage()); return false; } }