|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.job.FileJob
com.mucommander.job.TransferFileJob
com.mucommander.job.CalculateChecksumJob
public class CalculateChecksumJob
This job calculates a checksum for a list of files and stores the results in a checksum file.
The format of this file is a de facto standard ; a line is created for each file and goes like this:
e7e9576b9e55940b4b8522a65902d4cd readme.txt 119abda7c941135d5bf382c386bca2ca i386/debian-40r1-i386-DVD-1.iso 3c0d332902b9b8dfec43ba02d1618c6e ppc/debian-40r1-ppc-DVD-1.iso ...The path of each file is relative to the checksum file's path. In the above example,
readme.txt and
the checksum file are located in the same folder. Note that 2 space characters (and not just one as anyone in his
right mind would think) separate the hexadecimal checksum from the file path.
The above file format is used for all checksum algorithms but one: CRC32, which uses the special SFV format where the checksum for each file is written as follow:
wne-ebai.r00 697115b2 wne-ebai.r01 f80a8443 ...
| Field Summary |
|---|
| Fields inherited from class com.mucommander.job.FileJob |
|---|
APPEND_ACTION, APPEND_TEXT, baseSourceFolder, CANCEL_ACTION, CANCEL_TEXT, currentFile, currentFileIndex, currentFilename, files, FINISHED, INTERRUPTED, mainFrame, nbFiles, NOT_STARTED, PAUSED, progressDialog, RETRY_ACTION, RETRY_TEXT, RUNNING, SKIP_ACTION, SKIP_TEXT |
| Constructor Summary | |
|---|---|
CalculateChecksumJob(ProgressDialog progressDialog,
MainFrame mainFrame,
FileSet files,
AbstractFile checksumFile,
java.security.MessageDigest digest)
|
|
| Method Summary | |
|---|---|
protected boolean |
hasFolderChanged(AbstractFile folder)
Returns true if the given folder has or may have been modified by this job. |
protected void |
jobCompleted()
This method is called when this job has completed normal execution : all files have been processed without any interruption (without any call to FileJob.interrupt()). |
protected void |
jobStarted()
This method is called when this job starts, before the first call to FileJob.processFile(AbstractFile,Object) is made. |
protected void |
jobStopped()
Overrides FileJob.jobStopped() to stop any file processing by closing the source InputStream. |
protected boolean |
processFile(AbstractFile file,
java.lang.Object recurseParams)
Automatically called by FileJob.run() for each file that needs to be processed. |
| Methods inherited from class com.mucommander.job.FileJob |
|---|
addFileJobListener, getCurrentFileIndex, getCurrentFilename, getEffectiveJobTime, getEndDate, getNbFiles, getPausedTime, getPauseStartDate, getStartDate, getState, interrupt, refreshTables, removeFileJobListener, run, selectFileWhenFinished, setAutoUnmark, setPaused, setState, showErrorDialog, showErrorDialog, start, waitForUserResponse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CalculateChecksumJob(ProgressDialog progressDialog,
MainFrame mainFrame,
FileSet files,
AbstractFile checksumFile,
java.security.MessageDigest digest)
| Method Detail |
|---|
protected boolean processFile(AbstractFile file,
java.lang.Object recurseParams)
FileJobFileJob.run() for each file that needs to be processed.
processFile in class FileJobfile - the file or folder to processrecurseParams - array of parameters which can be used when calling this method recursively, contains null when called by FileJob.run()
true if the operation was sucessfulprotected boolean hasFolderChanged(AbstractFile folder)
FileJobtrue if the given folder has or may have been modified by this job.
This method is called after this job has finished processing files, to determine if the current MainFrame's
file tables need to be refreshed to reveal the modified contents.
hasFolderChanged in class FileJobfolder - the folder to test
protected void jobStarted()
FileJobFileJob.processFile(AbstractFile,Object) is made.
This method implementation does nothing but it can be overriden by subclasses to perform some first-time initializations.
jobStarted in class FileJobprotected void jobCompleted()
FileJobFileJob.interrupt()).
The call happens after the last call to FileJob.processFile(AbstractFile,Object) is made.
This method implementation does nothing but it can be overriden by subclasses to properly complete the job.
Note that this method will NOT be called if a call to FileJob.interrupt() was made before all files were processed.
jobCompleted in class FileJobprotected void jobStopped()
TransferFileJobFileJob.jobStopped() to stop any file processing by closing the source InputStream.
jobStopped in class TransferFileJob
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard