git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@151
be28352e-c001-0410-b1a7-
c7978e42abec
if (rchive==null)
rchive = new SessionFile(archive);
- archive.createNewFile();
if (!rchive.lockFile())
throw new IOException("Failed to get lock on file "+archive);
-
newarchive = new JarOutputStream(new BufferedOutputStream(new java.io.FileOutputStream(archive)));
entries = new Hashtable();
}
;
return fileLock;
}
-
+ public void unLock() {
+ this.unlockFile();
+ }
public java.io.Reader getDocumentReader() {
try {
}
return true;
} else {
- outstr.print("Document Object is null");
+ outstr.println("Document Object is null");
}
return false;
}
archive.createNewFile();
*/ // watch the new file... - taken straight from ClientsFileTest
FileWatcher w = new FileWatcher(archive);
- while (archive.exists()) {
+ while (true) {
// get watcher's lock to ensure state change is fixed for retrieval
Lock chlock = w.getChangedState();