Documentation for FileChannel.lock() and tryLock() says..
------------------------------------------------------------------------------
Parameters:
position - The position within the file at which the locked region is to start; must be non-negative
size - The size of the locked region; must be non-negative, and the sum position + size must be non-negative
shared - true to request a shared lock, false to request an exclusive lock
-------------------------------------------------------------------------------
Whereas both methods take no parameters.
------------------------------------------------------------------------------
Parameters:
position - The position within the file at which the locked region is to start; must be non-negative
size - The size of the locked region; must be non-negative, and the sum position + size must be non-negative
shared - true to request a shared lock, false to request an exclusive lock
-------------------------------------------------------------------------------
Whereas both methods take no parameters.
- duplicates
-
JDK-4472542 (doc) FileChannel.lock() and tryLock() documentation
-
- Closed
-