Filter the duplicates of a given text file usng java