File Locking In Java
In the Java API, acquiring a lock requires first obtaining the FileChannel for the file to be locked. The lock() method of the FileChannel is used to acquire the lock. The API of the lock() method is FileLock lock(long begin, long end, boolean shared) where begin and end are the beginning and ending positions of … Read more