My current code:
String file = "";
BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
while(in.ready()) file = file.concat(in.readLine());
Unfortunately it is awfully slow (starting with 2,000 lines per second but dropping to like 100 lines per second over time). What is the fastest way to load the content of that file in a string and out of curiosity, why are my lines per second dropping?
Thank you for your help!