Code example for FileLock

Methods: release, sleep

0
		System.out.println("trying to get lock");
		FileLock lock = fc.lock(start, end, false);
		System.out.println("got lock!");
		 
		System.out.println("pausing");
		try { Thread.sleep(3000); } catch (InterruptedException e) {}
		 
		System.out.println("going to release lock");
		lock.release();
		System.out.println("released lock");
		 
		raf.close();
	} 
	 
}