📅  最后修改于: 2022-03-11 14:52:10.341000             🧑  作者: Mango
String fileContent = new Scanner(new File("D:\\sample.txt"))
.useDelimiter("")
.tokens()
.reduce((s, r) -> s + r)
.orElseThrow(() -> new IOException("Empty File"));