com.jniwrapper.win32.io
Class WinNTWatcherStrategy

java.lang.Object
  extended by com.jniwrapper.win32.io.WatcherStrategy
      extended by com.jniwrapper.win32.io.WinNTWatcherStrategy

public class WinNTWatcherStrategy
extends WatcherStrategy

WinNTWatcherStrategy class implements a watcher strategy based on wrapping ReadDirectoryChangesW Win API function.

Platforms: WinNT (SP3 or later), Win2000, WinXP


Constructor Summary
WinNTWatcherStrategy(FileSystemWatcher fileSystemWatcher)
           
 
Method Summary
 int getBufferSize()
          Returns the buffer size in bytes.
 void setBufferSize(int value)
          Sets a new buffer size in bytes.
 void start()
          Starts watching.
 void stop()
          Stops watching.
 
Methods inherited from class com.jniwrapper.win32.io.WatcherStrategy
getFileSystemWatcher, isWatching, setWatching
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WinNTWatcherStrategy

public WinNTWatcherStrategy(FileSystemWatcher fileSystemWatcher)
Method Detail

start

public void start()
           throws FileSystemException
Description copied from class: WatcherStrategy
Starts watching.

Specified by:
start in class WatcherStrategy
Throws:
FileSystemException

setBufferSize

public void setBufferSize(int value)
Sets a new buffer size in bytes.
Property BufferSize determinates a number of bytes, that will be allocated for ReadDirectoryChangesW function to retrieve file system evevents. By default this buffer is allocated with 100 Kb.

Parameters:
value - is a new buffer size

getBufferSize

public int getBufferSize()
Returns the buffer size in bytes.

Returns:
a buffer size in bytes

stop

public void stop()
          throws FileSystemException
Description copied from class: WatcherStrategy
Stops watching.

Specified by:
stop in class WatcherStrategy
Throws:
FileSystemException