Closes this resource.
Closes this resource.
A stream of signalled objects which have pending events.
A stream of signalled objects which have pending events.
Note the WatchKey
objects returned by this stream must be reset before they will be queued again with any
additional events.
Retrieves and removes next watch key, waiting if none are yet present.
A watch service that watches registered objects for changes and events.
For example a file manager may use a watch service to monitor a directory for changes so that it can update its display of the list of files when files are created or deleted.
Note if any of the methods, or a stream returned by the
stream
method, is used after thisWatchService
has been closed, the operation will die with aClosedWatchServiceException
.