com.jgoodies.jdiskreport.model
Class PersistencyManager

java.lang.Object
  extended by com.jgoodies.jdiskreport.model.PersistencyManager

public final class PersistencyManager
extends Object

Saves and loads scan configurations (text files) and compressed binary scan results.

Version:
$Revision: 1.9 $
Author:
Karsten Lentzsch

Nested Class Summary
static class PersistencyManager.ReadWriteException
           
 
Constructor Summary
PersistencyManager()
           
 
Method Summary
 ScanConfiguration readScanConfiguration(File inputFile)
          Pre-considtion: the input file exists.
 ScanResult readScanResult(File inputFile)
          Reads a scan result from the specified input file.
 void writeScanConfiguration(File outputFile, ScanConfiguration configuration)
           
 void writeScanResult(File outputFile, ScanResult result)
          Saves the given scan result with its configuration and file tree to the specified output file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistencyManager

public PersistencyManager()
Method Detail

readScanConfiguration

public ScanConfiguration readScanConfiguration(File inputFile)
Pre-considtion: the input file exists.


writeScanConfiguration

public void writeScanConfiguration(File outputFile,
                                   ScanConfiguration configuration)

readScanResult

public ScanResult readScanResult(File inputFile)
Reads a scan result from the specified input file.

Parameters:
inputFile - the file to read the result from
Returns:
the scan result that holds the configuration, the file tree, and summary
Throws:
NullPointerException - if the input file is null

writeScanResult

public void writeScanResult(File outputFile,
                            ScanResult result)
Saves the given scan result with its configuration and file tree to the specified output file.

Parameters:
outputFile - the file to store the scan result
result - the scan result with configuration and file tree to be saved
Throws:
NullPointerException - if the output file or root is null


Copyright © 2000-2008 JGoodies Karsten Lentzsch. All Rights Reserved.