Bufferedredder.mark () Note, in the following code U3 = Br3.readline (); A Java.lang.OutOfMemoryError:Java heap space exception appears.
Mainly because Bufferedredder.mark (2147483632), 2147483632 value is too large to cause, so try not to set too big, not to Bufferedredder.mark (Integer.max_value). if the settings are too large, the task manager can see that this process consumes a particularly large amount of memory. So you can set it up enough.
String FileName3 = System.getproperty ("User.dir") + File.separator + "Dict" + file.separator + "Level3.txt";
Reader fi3 = new FileReader (FILENAME3);
BufferedReader Br3 = new BufferedReader (FI3);
if (br3.marksupported ()) {
SYSTEM.OUT.PRINTLN ("Support Mark");
Br3.mark (2147483632);
}
String U3;
try {
U3 = Br3.readline ();
System.out.println (U3);
}
catch (Exception e) {
E.printstacktrace ();
}
Br3.close ();
Bufferedreader.mark () Function considerations