public static List<String> readFileAsLines(final File selectedFile) throws SpyException {
  try {
    BufferedReader in=new BufferedReader(new FileReader(selectedFile));
    String str;
    final List<String> list=new ArrayList<String>();
    while ((str=in.readLine()) != null) {
      list.add(str);
    }
    in.close();
    return list;
  }
 catch (  IOException e) {
    throw new SpyException("Can't open the file at " + selectedFile.getAbsolutePath(),e);
  }
}

public static List < String > readFileAsLines ( final File selectedFile ) throws SpyException { try { BufferedReader in = new BufferedReader ( new FileReader ( selectedFile ) ) ; String str ; final List < String > list = new ArrayList < String > ( ) ; while ( ( str = in . readLine ( ) ) != null ) { list . add ( str ) ; } in . close ( ) ; return list ; } catch ( IOException e ) { throw new SpyException ( "Can't open the file at " + selectedFile . getAbsolutePath ( ) , e ) ; } }
reads lines from the given file and turns that into a list of lines .
