Please post enough code so that all the variables used in the post are defined. For example inFile is not defined.

Read a line from the file into a String and use the equals() method.