@@ -0,0 +1,1126 @@
+package io.highway.to.urhell.generator.impl;%0A%0Aimport io.highway.to.urhell.CoreEngine;%0Aimport io.highway.to.urhell.generator.TheJack;%0Aimport io.highway.to.urhell.service.LeechService;%0A%0Aimport java.io.BufferedWriter;%0Aimport java.io.File;%0Aimport java.io.FileWriter;%0Aimport java.io.IOException;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Collection;%0Aimport java.util.Date;%0A%0Aimport com.google.gson.Gson;%0A%0Apublic class FileGenerator implements TheJack %7B%0A%0A%09@Override%0A%09public String generatePage(Collection%3CLeechService%3E collectionService) %7B%0A%09%09Gson gson = new Gson();%0A%09%09String flux = gson.toJson(CoreEngine.getInstance()%0A%09%09%09%09.getLeechServiceRegistered());%0A%09%09SimpleDateFormat format = new SimpleDateFormat(%22ssmmHHddMMyy-h2h.json%22);%0A%09%09Date date = new Date();%0A%09%09String path = format.format(date);%0A%09%09try %7B%0A%09%09%09File file = new File(path);%0A%09%09%09if (!file.exists()) %7B%0A%09%09%09%09file.createNewFile();%0A%09%09%09%7D%0A%09%09%09FileWriter fw = new FileWriter(file.getAbsoluteFile());%0A%09%09%09BufferedWriter bw = new BufferedWriter(fw);%0A%09%09%09bw.write(flux);%0A%09%09%09bw.close();%0A%09%09%09fw.close();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%09%0A%09%09%7D%0A%09%09return path;%0A%09%7D%0A%0A%7D%0A

add file generator