I\'m getting a java outOfMemoryError when I call this method - i\'m using it in a loop to parse many large files in sequence. my guess is that result.toString()
result.toString()
Yes! Don't buffer in memory otherwise you'll run out of it specially if you're going over 2MB on I/O.
Recommended link for fixing and appending text: http://java.ittoolbox.com/documents/appending-data-to-a-file-18786