public static List<TestDiagnosticLine> readDiagnostics(File toRead,DiagnosticCodec codec,boolean omitEmptyDiagnostics){
  List<TestDiagnosticLine> lines=new ArrayList<>();
  JavaDiagnosticReader reader=new JavaDiagnosticReader(toRead,codec);
  while (reader.hasNext()) {
    TestDiagnosticLine line=reader.next();
    if (!omitEmptyDiagnostics || line.hasDiagnostics()) {
      lines.add(line);
    }
  }
  reader.close();
  return lines;
}

public static List < TestDiagnosticLine > readDiagnostics ( File toRead , DiagnosticCodec codec , boolean omitEmptyDiagnostics ) { List < TestDiagnosticLine > lines = new ArrayList < > ( ) ; JavaDiagnosticReader reader = new JavaDiagnosticReader ( toRead , codec ) ; while ( reader . hasNext ( ) ) { TestDiagnosticLine line = reader . next ( ) ; if ( ! omitEmptyDiagnostics || line . hasDiagnostics ( ) ) { lines . add ( line ) ; } } reader . close ( ) ; return lines ; }
reads the entire input file using the given codec and returns the resulting line .
