Is there any library for using some kind of cursor over a file? I have to read large files, but I can not afford to read them all at once in memory. I know java.nio, but I want to use a higher level API.
A little backgrond: I have a tool written in GWT that parses the submitted XML documents and then pretty xml prints, by the way. I am currently writing pretty printed xml for a temporary file (my lib will throw me an OOMException if I use simple strings), but the temp file size is close to 18 megabytes, I cannot allow the RPC GWT to be answered using 18 megs :)
So, I have a widget to show only the xml part (check this example ), but I need to read the corresponding part of the file.
source
share