I read a 3 MB text file put its content to my StyleClassedTextArea object with the following code:
byte[] bytes = Files.readAllBytes(file.toPath());
String str = new String(bytes, "UTF-8");
area.setStyleClass(0, area.getLength(), UNKNOWN);
area.replaceText(0, area.getLength(), str);
My program stucks and on the tast manager memory usage starts to increase from 180 MB to something around 4GB.
Am I doing something wrong?
I read a 3 MB text file put its content to my StyleClassedTextArea object with the following code:
byte[] bytes = Files.readAllBytes(file.toPath());
String str = new String(bytes, "UTF-8");
area.setStyleClass(0, area.getLength(), UNKNOWN);
area.replaceText(0, area.getLength(), str);
My program stucks and on the tast manager memory usage starts to increase from 180 MB to something around 4GB.
Am I doing something wrong?