net.larsan.urd.util.fileset
Class JarFile

java.lang.Object
  |
  +--net.larsan.urd.util.fileset.FileSet
        |
        +--net.larsan.urd.util.fileset.TrivialFileSet
              |
              +--net.larsan.urd.util.fileset.JarFile
All Implemented Interfaces:
ResourceLocator, WatchableFileSet
Direct Known Subclasses:
JarArchive

public class JarFile
extends TrivialFileSet
implements WatchableFileSet

A trivial file set that watches a single jar file.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Field Summary
 
Fields inherited from class net.larsan.urd.util.fileset.TrivialFileSet
file, resources
 
Fields inherited from class net.larsan.urd.util.fileset.FileSet
root
 
Constructor Summary
JarFile(java.io.File file, java.util.Timer timer)
          Create file set using a file plus a timer object.
 
Method Summary
protected  void doScan()
          Perfom scan.
 
Methods inherited from class net.larsan.urd.util.fileset.TrivialFileSet
addFileSetListener, checkScan, getCertificates, getResource, getResourcePaths, removeFileSetListener, scan, start, stop
 
Methods inherited from class net.larsan.urd.util.fileset.FileSet
getErrorHandler, isRecursive, matches, resolvePath, setErrorHandler, setIsRecursive, setRegexpPattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.larsan.urd.util.fileset.WatchableFileSet
addFileSetListener, removeFileSetListener
 

Constructor Detail

JarFile

public JarFile(java.io.File file,
               java.util.Timer timer)
        throws java.io.IOException
Create file set using a file plus a timer object. The timer will be used for the file watch, if set to null the watch will be disabled.

Parameters:
file - File to watch, must not be null
timer - Timer to use, may be null
Throws:
java.io.IOException - If the file does not exist
Method Detail

doScan

protected void doScan()
               throws java.io.IOException
Perfom scan. This method should populate the resource map with new resources.

Overrides:
doScan in class TrivialFileSet
java.io.IOException