A number of APIs. For a simple text file, Scanner is a convinient and easy to use approach. You can create a Scanner for the file, iterate it line by line in a while loop. If your file format is more complex (ie containing username, address, age, id-number etc.... various different types) you can pass each line to a new Scanner and ask like...

name=scanner.next();
age=scanner.nextInt();
id= scanner.nextLong();

Since you handle the writing yourself as well (?), you are certain in which order the items occur in the file.

It might be worthwhile to also check how to do the same using methods contained in the wrapper classes (Integer for int and so on) and String. You can also experiment how to read the contents of the file using Reader instances / various InputStream instances. But for all sh**s and giggles, Scanner is a decent approach for your problem.