📜  使用文本 - 从类路径中逐行读取文本 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:54.081000             🧑  作者: Mango

代码示例1
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);
}