jonelo.jacksum.ui

Class CheckFile


public class CheckFile
extends java.lang.Object

This class can be used to check the file integrity of files against a given file list.

Field Summary

static String
COMMENTDEFAULT
Lines starting with this special String are ignored

Constructor Summary

CheckFile(String checkFile)
Creates a CheckFile.

Method Summary

MetaInfo
getMetaInfo()
Gets meta-information.
long
getModified()
long
getRemoved()
Summary
getSummary()
Get the Summary object.
Verbose
getVerbose()
Determines what verbose level is wanted.
String
getWorkingDir()
boolean
isList()
Determines whether a short list is wanted.
void
perform()
Reads the file which has been specified at the constructor.
void
setList(boolean list)
Sets the list value.
void
setMetaInfo(MetaInfo metaInfo)
Sets meta-information.
void
setSummary(Summary summary)
Sets the summary object containing all data for the summary.
void
setVerbose(Verbose verbose)
Sets the verbose object containing the verbose level.
void
setWorkingDir(String workingDir)

Field Details

COMMENTDEFAULT

public static final String COMMENTDEFAULT
Lines starting with this special String are ignored

Constructor Details

CheckFile

public CheckFile(String checkFile)
Creates a CheckFile.
Parameters:
checkFile - a file containing filenames and their checksums and in best case meta-information

Method Details

getMetaInfo

public MetaInfo getMetaInfo()
Gets meta-information.
Returns:
the MetaInfo object.

getModified

public long getModified()

getRemoved

public long getRemoved()

getSummary

public Summary getSummary()
Get the Summary object.
Returns:
the Summary object containing all data for the summary

getVerbose

public Verbose getVerbose()
Determines what verbose level is wanted.
Returns:
the verbose object containing the verbose level

getWorkingDir

public String getWorkingDir()

isList

public boolean isList()
Determines whether a short list is wanted.
Returns:
the boolean state whether a list is wanted.

perform

public void perform()
            throws FileNotFoundException,
                   IOException,
                   MetaInfoVersionException,
                   ExitException
Reads the file which has been specified at the constructor. The file is read and info about modifications are printed out. The output is controlled by the set methods of this class.

setList

public void setList(boolean list)
Sets the list value.
Parameters:
list - the boolean state whether a list is wanted.

setMetaInfo

public void setMetaInfo(MetaInfo metaInfo)
Sets meta-information. This meta-information is the fallback if the checkFile doesn't contain meta-information.
Parameters:

setSummary

public void setSummary(Summary summary)
Sets the summary object containing all data for the summary.
Parameters:
summary - the Summary object.

setVerbose

public void setVerbose(Verbose verbose)
Sets the verbose object containing the verbose level.
Parameters:
verbose - the Verbose object.

setWorkingDir

public void setWorkingDir(String workingDir)