title: Java File I/O - Text File - How to check for content?
body: <p>I was wondering, If i had a java class, that wanted to consult a txt file with say a list of names like</p>
  
  <pre><code>tom
  steve
  jones
  </code></pre>
  
  <p>how could i open the text file in the java program and basically see if a string contained in the program matches one of these names?</p>
  
  <p>so far i have come up with</p>
  
  <pre><code>                try {
                  BufferedReader inputReader = new BufferedReader(new FileReader("users.txt"));
  
                  while (inputReader.readLine() != null){
  
                  }
  
              } catch (FileNotFoundException e1) {
                  // TODO Auto-generated catch block
                  e1.printStackTrace();
              } catch (IOException ep) {
                  // TODO Auto-generated catch block
                  p.printStackTrace();
              }
  </code></pre>
  
  <p>but do not no where to go from here..</p>