SalesPoint v3.3 API

log
Class LogFileContent

java.lang.Object
  extended by log.LogFileContent
All Implemented Interfaces:
Serializable

public class LogFileContent
extends Object
implements Serializable

Represents the content of a log file.

This class takes a log file or a LogInputStream as parameter, reads all LogEntries from that file and stores them in a List.

Having all LogEntries in a List, makes it easy to display them in a LogTableForm or writing them to the persistence file when saving the Shop's state.

Since:
v3.1
Author:
Andreas Bartho
See Also:
Serialized Form

Constructor Summary
LogFileContent(File f)
          Creates a LogFileContent.
LogFileContent(LogInputStream lis)
          Creates a LogFileContent.
 
Method Summary
 List<LogEntry> getContentList()
           
 void update(File f)
          Replaces all currently saved LogEntries with new ones.
 void update(LogInputStream lis)
          Replaces all currently saved LogEntries with new ones.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogFileContent

public LogFileContent(File f)
Creates a LogFileContent. All LogEntries are read from the passed log file and stored in a list.

Parameters:
f - the file to be read from.

LogFileContent

public LogFileContent(LogInputStream lis)
Creates a LogFileContent. All LogEntries are read from the passed LogInputStream and stored in a list.

Parameters:
lis - the LogInputStream to be read from.
Method Detail

update

public void update(File f)
Replaces all currently saved LogEntries with new ones.

Parameters:
f - the log file to be read from

update

public void update(LogInputStream lis)
Replaces all currently saved LogEntries with new ones.

Parameters:
lis - the LogInputStream to be read from.

getContentList

public List<LogEntry> getContentList()
Returns:
the List of currently saved LogEntries

SalesPoint v3.3 API