public void handleEvents() throws Exception {
		while(true){
			WatchKey key = watcher.take();
			for(WatchEvent<?> event:key.pollEvents()){
				WatchEvent.Kind kind = event.kind();
				if(kind==StandardWatchEventKinds.OVERFLOW){
					continue;
				}
				WatchEvent<Path> e = (WatchEvent<Path>)event;
				Path fileName = e.context();
				System.out.printf("Event %s has happened,which fileName is %s%n"  
                        ,kind.name(),fileName); 
			}
		}
	}