Answers for "Working with text - read text by lines from classpath"

0

Working with text - read text by lines from classpath

try (BufferedReader reader = new BufferedReader(new InputStreamReader(FileReader.class.getResourceAsStream("data.csv")))) {
    new FileReader().readLines(reader);
} catch (IOException ioe) {
    throw new IllegalStateException("Can not read file", ioe);
}
Posted by: Guest on April-25-2021

Code answers related to "Working with text - read text by lines from classpath"

Browse Popular Code Answers by Language