This is a convenience method for acquiring a maximum length lock on a file. It is equivalent to:
fileChannel.lock(0L, Long.MAX_VALUE, false)@return the lock object representing the locked file area. @throws ClosedChannelException the file channel is closed. @throws NonWritableChannelException this channel was not opened for writing. @throws OverlappingFileLockException Either a lock is already held that overlaps this lock request, or another thread is waiting to acquire a lock that will overlap with this request. @throws FileLockInterruptionException The calling thread was interrupted while waiting to acquire the lock. @throws AsynchronousCloseException The channel was closed while the calling thread was waiting to acquire the lock. @throws IOException some other problem occured obtaining the requested lock.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|