FileUtil.readLines(File) method

This commit is contained in:
Anton Makeev
2013-11-28 11:40:13 +01:00
parent 5b6dadbd16
commit 9d6c3a8008
@@ -1349,6 +1349,11 @@ public class FileUtil extends FileUtilRt {
return FileUtilRt.loadText(reader, length);
}
@NotNull
public static List<String> loadLines(@NotNull File file) throws IOException {
return loadLines(file.getPath());
}
@NotNull
public static List<String> loadLines(@NotNull String path) throws IOException {
BufferedReader reader = new BufferedReader(new FileReader(path));