protected static String[] readFile (String fileName) {
        List<String> lines = new LinkedList<>();
        try (BufferedReader br = new BufferedReader(
                new InputStreamReader(new FileInputStream(new File(fileName)), StandardCharsets.UTF_8))) {
            for (String line = br.readLine();
                 line != null;
                 line = br.readLine()) {
                lines.add(line);
            }
            return lines.toArray(new String[0]);
        } catch (Throwable e) {
            return new String[0];
        }
    }
read a text file into a string array
vespalog/src/test/java/com/yahoo/log/VespaLogHandlerTestCase.java