java scanner tokens with withespace code example
Example: java scanner tokens with withespace
String fileContent = new Scanner(new File("D:\\sample.txt"))
.useDelimiter("")
.tokens()
.reduce((s, r) -> s + r)
.orElseThrow(() -> new IOException("Empty File"));