public class MD5SumWatcher
extends java.lang.Object
Constructor and Description |
---|
MD5SumWatcher(java.io.File watchedFile)
Create a new MD5SumWatcher instance
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getSum()
Get the current MD5 sum of the watched file
|
boolean |
update()
Detect if the file's MD5 has changed and track its new sum if so
|
public MD5SumWatcher(java.io.File watchedFile)
watchedFile
- the file to watchpublic byte[] getSum() throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
- if the watched file does not existjava.io.IOException
- if the file cannot be readpublic boolean update() throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
- if the watched file does not existjava.io.IOException
- if the file cannot be read