org.tranche.server.logs
Class LogReader

java.lang.Object
  extended by org.tranche.server.logs.LogReader

public class LogReader
extends java.lang.Object

Reads in a log file, iterating through entries

Author:
Bryan E. Smith - bryanesmith@gmail.com

Constructor Summary
LogReader(java.io.File log)
          Create a log reader opening up a log file.
 
Method Summary
 void close()
          Close file that the log reader has opened.
 boolean hasNext()
          Returns true if there is another log entry to read; otherwise false.
 LogEntry next()
          Return the next log entry from the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogReader

public LogReader(java.io.File log)
          throws java.lang.Exception
Create a log reader opening up a log file.

Parameters:
log -
Throws:
java.lang.Exception
Method Detail

hasNext

public boolean hasNext()
                throws java.lang.Exception
Returns true if there is another log entry to read; otherwise false.

Returns:
Throws:
java.lang.Exception

next

public LogEntry next()
              throws java.lang.Exception
Return the next log entry from the file.

Returns:
Throws:
java.lang.Exception

close

public void close()
           throws java.lang.Exception
Close file that the log reader has opened.

Throws:
java.lang.Exception


This code is free for use both commercially and non-commercially as stated in the project's license