I want to read almost 5-6 gigabytes of files in a row, but how can I read them quickly?
performance java file-io io
I can read quickly using Buffer Reader
try (BufferedReader br = new BufferedReader(new FileReader(file))) {
String line;
while ((line = br.readLine()) != null) {
// // process the line.
}
}
© 2024 OneMinuteCode. All rights reserved.