medi.util
Class VolumeScanningSaver

java.lang.Object
  |
  +--medi.util.VolumeScanningSaver

public class VolumeScanningSaver
extends java.lang.Object

It is a class used to save information about volume scanning.


Constructor Summary
VolumeScanningSaver(java.lang.String fileName)
          Creates new VolumeScanningSaver
 
Method Summary
 void addDirectory(java.lang.String curDir)
          Adds a directory in the file.
 void addExitSubdir()
          Currently unused.
 void addFile(java.lang.String curFile)
          Adds a file name in the file.
 void clear()
          Puts everything in a clean status.
 java.lang.String getDirectory()
          Returns a directory.
 java.lang.String getFile()
          Returns a file.
 java.lang.String getVolumeName()
          Returns the volume name.
 boolean isSuspended()
          Checks if the thread is suspended.
 void load()
          Loads the file.
 void loadStatus()
          Loads the status from the file.
 void save()
          Saves the file.
 void saveStatus()
          Saves the status in the file.
 void setVolumeName(java.lang.String vname)
          Sets the volume name.
 void undo()
          Rollbacks the last read operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VolumeScanningSaver

public VolumeScanningSaver(java.lang.String fileName)
Creates new VolumeScanningSaver

Parameters:
fileName - The file name in which information will be saved.
Method Detail

addDirectory

public void addDirectory(java.lang.String curDir)
Adds a directory in the file.

Parameters:
curDir - The directory to add.

addFile

public void addFile(java.lang.String curFile)
Adds a file name in the file.

Parameters:
curFile - The file name to add.

addExitSubdir

public void addExitSubdir()
Currently unused.


clear

public void clear()
Puts everything in a clean status.


load

public void load()
          throws java.io.FileNotFoundException
Loads the file.

Throws:
java.io.FileNotFoundException - If the file is not found.

loadStatus

public void loadStatus()
Loads the status from the file.


save

public void save()
          throws java.io.IOException
Saves the file.

Throws:
java.io.IOException - If something goes wrong.

saveStatus

public void saveStatus()
                throws java.io.IOException
Saves the status in the file.

Throws:
java.io.IOException - If something goes wrong.

setVolumeName

public void setVolumeName(java.lang.String vname)
Sets the volume name.

Parameters:
vname - The volume name to store.

getVolumeName

public java.lang.String getVolumeName()
Returns the volume name.

Returns:
The volume name.

getDirectory

public java.lang.String getDirectory()
Returns a directory.

Returns:
The directory to get, only if you are starting the process for the first time or getFile() method returned null.

getFile

public java.lang.String getFile()
Returns a file.

Returns:
The file, only if the currently pointed element is a file, null otherwise.

isSuspended

public boolean isSuspended()
Checks if the thread is suspended. Currently unused.

Returns:
Nothing to say.

undo

public void undo()
Rollbacks the last read operation.