year_2021/src/main/java/nl/mwensveen/adventofcode/year_2021/FileReadHelper.java
public static List<String> readLinesAsStrings(String fileName) {
        URL url = Resources.getResource(fileName);
        List<String> lines;
        try {
            lines = Files.readLines(new File(url.getFile()), Charset.defaultCharset());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return ImmutableList.copyOf(lines);
    }
/**
     * Read lines of the file and return each line as String.
     *
     * @param fileName the file name
     * @return an immutable list
     */
Read lines of the file and return each line as String.
@param fileName the file name
@return an immutable list
Read lines of the file and return each line as String . @param fileName the file name @return an immutable list
public static List<String> readLinesAsStrings(String fileName) {
        URL url = Resources.getResource(fileName);
        List<String> lines;
        try {
            lines = Files.readLines(new File(url.getFile()), Charset.defaultCharset());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return ImmutableList.copyOf(lines);
    }
public static List < String > readLinesAsStrings ( String fileName ) { URL url = Resources . getResource ( fileName ) ; List < String > lines ; try { lines = Files . readLines ( new File ( url . getFile ( ) ) , Charset . defaultCharset ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } return ImmutableList . copyOf ( lines ) ; }
Read lines of the file and return each line as String.
Read lines of the file and return each line as String .