File.unlock

Overview | Methods | This Package | All Packages

File.unlock

Unlocks a region in this file.

Syntax

public void unlock( long position, long length )

Parameters

position

The starting position of the range to be unlocked.

length

The length of the range to be unlocked.

Exceptions

WinIOException thrown if an error occurs or if the file has been closed.

Remarks

Unlocking a region enables other processes to access the region. The region to unlock must correspond exactly to an existing locked region. For example, two adjacent regions of a file cannot be locked separately and then unlocked as a single region that spans both locked regions. A process should end with a portion of a file locked, and a file that has locked regions should not be closed.

See Also   lock