adds File Helper, project files and gitignore
This commit is contained in:
16
java_src/FileHelper.java
Normal file
16
java_src/FileHelper.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package java_src;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public class FileHelper {
|
||||
|
||||
public static String readJson(Path path) throws IOException {
|
||||
StringBuilder jsonString = new StringBuilder();
|
||||
for (String line : Files.readAllLines(path)) {
|
||||
jsonString.append(line);
|
||||
}
|
||||
return jsonString.toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user