@Test public final void testCountLines() { Integer count = testInstance.countLines("Dummy", "crawl.log"); assertTrue(count == 5301); }
public Integer countLines(String aJob, String aFileName) { Integer count = 0; File logFile = logProvider.getLogFile(aJob, aFileName); if (logFile != null) { try{ BufferedReader bf = new BufferedReader(new FileReader(logFile), 8192); while (bf.readLine() != null){ count++; } } catch(IOException e){ e.printStackTrace(); return null; } } return count; }
LogReaderImpl implements LogReader { public Integer countLines(String aJob, String aFileName) { Integer count = 0; File logFile = logProvider.getLogFile(aJob, aFileName); if (logFile != null) { try{ BufferedReader bf = new BufferedReader(new FileReader(logFile), 8192); while (bf.readLine() != null){ count++; } } catch(IOException e){ e.printStackTrace(); return null; } } return count; } }
LogReaderImpl implements LogReader { public Integer countLines(String aJob, String aFileName) { Integer count = 0; File logFile = logProvider.getLogFile(aJob, aFileName); if (logFile != null) { try{ BufferedReader bf = new BufferedReader(new FileReader(logFile), 8192); while (bf.readLine() != null){ count++; } } catch(IOException e){ e.printStackTrace(); return null; } } return count; }  }
LogReaderImpl implements LogReader { public Integer countLines(String aJob, String aFileName) { Integer count = 0; File logFile = logProvider.getLogFile(aJob, aFileName); if (logFile != null) { try{ BufferedReader bf = new BufferedReader(new FileReader(logFile), 8192); while (bf.readLine() != null){ count++; } } catch(IOException e){ e.printStackTrace(); return null; } } return count; }  List<String> listLogFiles(String aJob); LogFilePropertiesDTO[] listLogFileAttributes(String aJob); Integer countLines(String aJob, String aFileName); String[] tail(String aJob, String aFileName, int noOfLines); String[] get(String aJob, String aFileName, int startLine, int noOfLines); String[] getHopPath(String aJob, String aResultOid, String aFileName, String aUrl); String[] getByRegExpr(String aJob, String aFileName, String regExpr, String addLines, boolean prependLineNumbers, int skipFirstMatches, int numberOfMatches); Integer findFirstLineBeginning(String aJob, String aFileName, String match); Integer findFirstLineContaining(String aJob, String aFileName, String match); Integer findFirstLineAfterTimeStamp(String aJob, String aFileName, Long timestamp); void setLogProvider(LogProvider logProvider); File retrieveLogfile(String aJob, String aFilename); }
LogReaderImpl implements LogReader { public Integer countLines(String aJob, String aFileName) { Integer count = 0; File logFile = logProvider.getLogFile(aJob, aFileName); if (logFile != null) { try{ BufferedReader bf = new BufferedReader(new FileReader(logFile), 8192); while (bf.readLine() != null){ count++; } } catch(IOException e){ e.printStackTrace(); return null; } } return count; }  List<String> listLogFiles(String aJob); LogFilePropertiesDTO[] listLogFileAttributes(String aJob); Integer countLines(String aJob, String aFileName); String[] tail(String aJob, String aFileName, int noOfLines); String[] get(String aJob, String aFileName, int startLine, int noOfLines); String[] getHopPath(String aJob, String aResultOid, String aFileName, String aUrl); String[] getByRegExpr(String aJob, String aFileName, String regExpr, String addLines, boolean prependLineNumbers, int skipFirstMatches, int numberOfMatches); Integer findFirstLineBeginning(String aJob, String aFileName, String match); Integer findFirstLineContaining(String aJob, String aFileName, String match); Integer findFirstLineAfterTimeStamp(String aJob, String aFileName, Long timestamp); void setLogProvider(LogProvider logProvider); File retrieveLogfile(String aJob, String aFilename);  }