My goal is to read a file to memory (to a HashMap) and when it reaches, for example, 90% of the available memory, write the block to a file, clean the HashMap and continue r