Here you can find the source of readAllLinesOrExit(Path path)
public static List<String> readAllLinesOrExit(Path path)
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; public class Main { public static List<String> readAllLinesOrExit(Path path) { try {/*from www.j a va2 s. c o m*/ return Files.readAllLines(path, Charset.forName("UTF-8")); } catch (IOException e) { System.err.println("Failed to read [" + path + "]: " + e.getMessage()); System.exit(0); } return null; } }