|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.feide.moria.servlet.FileMonitor
public class FileMonitor
Based (in part) on ConfigurationManager#FileListenerTask
| Field Summary | |
|---|---|
private long |
lastModified
Modification time of the watched file. |
private java.io.File |
monitoredFile
The monitored file |
| Constructor Summary | |
|---|---|
FileMonitor(java.lang.String fileURI)
Constructor. |
|
| Method Summary | |
|---|---|
private static java.io.File |
fileForURI(java.lang.String fileURI)
Resolves a fileURI to a File object. |
boolean |
hasChanged()
Returns true if the monitored file has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final java.io.File monitoredFile
private long lastModified
| Constructor Detail |
|---|
public FileMonitor(java.lang.String fileURI)
throws java.io.FileNotFoundException
fileURI - The file to monitor
java.io.FileNotFoundException| Method Detail |
|---|
public boolean hasChanged()
true if the monitored file has changed.
true if file has changed
private static java.io.File fileForURI(java.lang.String fileURI)
throws java.io.FileNotFoundException
File object.
fileURI - Reference to the file (full path or relative within the
classpath).
File object referenced by the fileURI.
java.io.FileNotFoundException - If the fileURI cannot be resolved to a readable file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||