1) You can read in the entire file and save it, line by line, into a String array. This is rather simple and you should find plenty of tutorials on how to do this.
2) Then you can go to the desired...