[jdom-interest] Any ideas? Document/File modification link ...

Jon Baer jonbaer at digitalanywhere.com
Sun Jun 30 22:12:56 PDT 2002


Can someone offer some good insight as to whether or not I am doing this 
right ...

Basically what Im trying to do is extend java.io.File with a single 
method/thread of addListener() is listen for modification times to 
lastModified of the file being built into a JDOM Document.  

So basically ...

SFile file = new SFile("file1.xml");
file.addListener(this);
Document doc = new Document(file);
// etc, etc, etc.

public void fileUpdated(FileEvent fe) {
}

Is there an easier/correct way to synronize the document w/ it's file 
like this?  Im not sure if Im asking the question the right way but 
basically the modification needs to update the document in a cache 
accordingly and this seems to be the only way I can think of doing it.

- Jon





More information about the jdom-interest mailing list