@Test public final void testFindFirstLineAfterTimeStamp() { Long timestamp = new Long(20080618062122L); Integer result = testInstance.findFirstLineAfterTimeStamp("Dummy", "crawl.log", timestamp); assertNotNull(result); assertTrue(result.intValue() == 4656); }
public Integer findFirstLineAfterTimeStamp(String aJob, String aFileName, Long timestamp) { Integer line = 0; try { File logFile = logProvider.getLogFile(aJob, aFileName); if (logFile != null) { line = findFirstLineAfterTimeStamp(new FileReader(logFile), timestamp); } } catch(IOException e) { e.printStackTrace(); return null; } return line; }
LogReaderImpl implements LogReader { public Integer findFirstLineAfterTimeStamp(String aJob, String aFileName, Long timestamp) { Integer line = 0; try { File logFile = logProvider.getLogFile(aJob, aFileName); if (logFile != null) { line = findFirstLineAfterTimeStamp(new FileReader(logFile), timestamp); } } catch(IOException e) { e.printStackTrace(); return null; } return line; } }
LogReaderImpl implements LogReader { public Integer findFirstLineAfterTimeStamp(String aJob, String aFileName, Long timestamp) { Integer line = 0; try { File logFile = logProvider.getLogFile(aJob, aFileName); if (logFile != null) { line = findFirstLineAfterTimeStamp(new FileReader(logFile), timestamp); } } catch(IOException e) { e.printStackTrace(); return null; } return line; }  }
LogReaderImpl implements LogReader { public Integer findFirstLineAfterTimeStamp(String aJob, String aFileName, Long timestamp) { Integer line = 0; try { File logFile = logProvider.getLogFile(aJob, aFileName); if (logFile != null) { line = findFirstLineAfterTimeStamp(new FileReader(logFile), timestamp); } } catch(IOException e) { e.printStackTrace(); return null; } return line; }  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 findFirstLineAfterTimeStamp(String aJob, String aFileName, Long timestamp) { Integer line = 0; try { File logFile = logProvider.getLogFile(aJob, aFileName); if (logFile != null) { line = findFirstLineAfterTimeStamp(new FileReader(logFile), timestamp); } } catch(IOException e) { e.printStackTrace(); return null; } return line; }  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);  }