doubles = new HashMap<>();
int d = 0;
diff --git a/src/app/Tools.java b/src/app/Tools.java
index 313b618..d9b076d 100644
--- a/src/app/Tools.java
+++ b/src/app/Tools.java
@@ -7,23 +7,24 @@ public class Tools {
Execute x;
- public Tools() {
- x = new Execute();
- }
+ public Tools() {
+ x = new Execute();
+ }
- /**
- * @return Md5 of File at @param path
- */
- public String getMd5(String path) {
- // output of md5sum: "md5 filepath"
- BufferedReader md5reader = x.execute(new String[] { "md5sum", path }).output;
- String md5 = null;
- try {
- md5 = md5reader.readLine().split(" ")[0];
- } catch (IOException e) {
- e.printStackTrace();
- }
- return md5;
- }
+ /**
+ * @param path String
+ * @return Md5 of File at path
+ */
+ public String getMd5(String path) {
+ // output of md5sum is "md5 filepath"
+ BufferedReader md5reader = x.execute(new String[]{"md5sum", path}).output;
+ String md5 = null;
+ try {
+ md5 = md5reader.readLine().split(" ")[0];
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return md5;
+ }
}
diff --git a/src/app/Write.java b/src/app/Write.java
index b5c8e4d..1ac81cc 100644
--- a/src/app/Write.java
+++ b/src/app/Write.java
@@ -4,53 +4,56 @@ import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.Map;
+
import app.Artifacts.MFile;
public class Write {
/**
- * writes text to file at path
- *
- */
- public void textFile(String path, StringBuilder text) {
- try {
- BufferedWriter bw = new BufferedWriter(new FileWriter(new File(path)));
- bw.write(text.toString());
- bw.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
-
- /**
- * append all elements of pool to StringBuilder and write to
- * /tmp/name
- *
- *
- * @param pool
- */
- public void textPool(String name, Map pool) {
- StringBuilder text = new StringBuilder();
- for (int i = 0; i < pool.size(); i++) {
- text.append(i + " " + pool.get(i) + "\n");
- }
- textFile("/tmp/" + name, text);
- }
-
-
- /**
- * append all elements of md5Pool to StringBuilder and write to
- * /tmp/name
- *
- *
- * @param md5Pool
- */
- public void textMd5Pool(String name, Map md5Pool) {
- StringBuilder text = new StringBuilder();
- for (int i = 0; i < md5Pool.size(); i++) {
- text.append(i + " " + md5Pool.get(i).md5 + " " + md5Pool.get(i).file + "\n");
- }
- textFile("/tmp/" + name, text);
- }
+ * Write text to file at path .
+ *
+ * @param path String
+ * @param text StringBuilder
+ */
+ public void textFile(String path, StringBuilder text) {
+ try {
+ BufferedWriter bw = new BufferedWriter(new FileWriter(new File(path)));
+ bw.write(text.toString());
+ bw.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ /**
+ * Append all elements of pool to StringBuilder
+ * and write to /tmp/name .
+ *
+ * @param name String
+ * @param pool Map< Integer, File />
+ */
+ public void textPool(String name, Map pool) {
+ StringBuilder text = new StringBuilder();
+ for (int i = 0; i < pool.size(); i++) {
+ text.append(i + " " + pool.get(i) + "\n");
+ }
+ textFile("/tmp/" + name, text);
+ }
+
+
+ /**
+ * Append all elements of pool to StringBuilder
+ * and write to /tmp/name .
+ *
+ * @param name String
+ * @param md5Pool Map< Integer, MFile />
+ */
+ public void textMd5Pool(String name, Map md5Pool) {
+ StringBuilder text = new StringBuilder();
+ for (int i = 0; i < md5Pool.size(); i++) {
+ text.append(i + " " + md5Pool.get(i).md5 + " " + md5Pool.get(i).file + "\n");
+ }
+ textFile("/tmp/" + name, text);
+ }
}