0

I have 200 mb file in a encripted file directory which is of 1 million records . I want to process each record and send it back to encrypted file directory. If it is normal file directory the I could reach record by record and process and write it.but here the limitation is since I need to write on encrypted directory after writing first record I don't have access to write/edit/append other records on existing file. So I created string buffer and append each processed record to string buffer so that in single write operation I can write entire 200mb data to encrypted file directory..So the question is how to maintain this much of data in Java application.

  • Always **search Stack Overflow** thoroughly before posting. Both your topics of adjusting heap and processing large text have been covered many many times on Stack Overflow. If you Question truly is different, explain how the existing Q&A do not suffice. – Basil Bourque Dec 23 '18 at 07:02

1 Answers1

0

Create a stream and use it. In this way you won't be harsh on your memory and you can perform what all operations you want. Read in chunks and process it.

Dinesh Verma
  • 585
  • 5
  • 8