I am getting java heap space error while reading 600 mb text file. Actually I have to process each line and add the data to xml object. Due to this the size of object is dynamically growing. ANd giving heap space problem. I am using BufferedReader. Can any one please suggest some ideas?
I don't know what you are doing, so it's hard for me to give you exact instructions (and even if I did know, I'd tell you to do your own work).
In general, rather than trying to read in all the data and manipulate the XML in-memory, try to read in one line of input and write out one "record" of XML.