I have a file with a lot of numbers in it and I want to read the numbers from the file one by one, test them and then either leave them or delete them from the file. What I/O stream would be good for that? It would need to be able to remove the number without leaving whitespace, for example from 1 2 3 4 5 to 1 3 5.