public long getTotal(String file) throws IOException {
long sum = readFileBuffered(file, (InputStream in) -> {
long current = 0;
for (;;) {
int b = in.read();
if (b == -1) {
return current;
}
current += b;
}
});
return sum;
}
Last edited by admin on Wed Dec 29, 2021 10:59 am, edited 1 time in total.
Reason:wrapped code within [code] [/code] and formatted