Thanks for all the answer before.
I have this problem many times.
what I did is to read a big xml(about 50mb), and make some string replacement, then output it.so I need to use pub.string:bytesToString to change the input file to String.
It worked well before even with 111mb.
But today java.nio.BufferOverflowException comes out when it process any files bigger than 20mb. And the system usage goes to 90% at the same time. (I use the same input xml as before)
I didn’t make any change, but it just keeps giving me the exception. This happened before and when I changed encoding to UTF-8 it was solved. after that, it worked well also for the ISO-8859-1.
It is very nasty, in the last 1 month, I am keeping fighting with it. Some time it even works with 111mb. no matter what encoding it is. And when I test with small files(up to 20mb sometimes), everything works well. And when I think I get it done finally, after several days, it comes out again.
please help me if you know what caused that. what I don’t understand is why it works sometime but not all the time. and why it works last week but not today, I didn’t change anything. Thanks very much