FileLock Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
FileLock(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
FileLock(AsynchronousFileChannel, Int64, Int64, Boolean) |
Initializes a new instance of this class. |
FileLock(FileChannel, Int64, Int64, Boolean) |
Initializes a new instance of this class. |
FileLock(IntPtr, JniHandleOwnership)
A constructor used when creating managed representations of JNI objects; called by the runtime.
protected FileLock (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Nio.Channels.FileLock : nativeint * Android.Runtime.JniHandleOwnership -> Java.Nio.Channels.FileLock
Parameters
- transfer
- JniHandleOwnership
A JniHandleOwnershipindicating how to handle javaReference
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
FileLock(AsynchronousFileChannel, Int64, Int64, Boolean)
Initializes a new instance of this class.
[Android.Runtime.Register(".ctor", "(Ljava/nio/channels/AsynchronousFileChannel;JJZ)V", "", ApiSince=26)]
protected FileLock (Java.Nio.Channels.AsynchronousFileChannel? channel, long position, long size, bool shared);
[<Android.Runtime.Register(".ctor", "(Ljava/nio/channels/AsynchronousFileChannel;JJZ)V", "", ApiSince=26)>]
new Java.Nio.Channels.FileLock : Java.Nio.Channels.AsynchronousFileChannel * int64 * int64 * bool -> Java.Nio.Channels.FileLock
Parameters
- channel
- AsynchronousFileChannel
The channel upon whose file this lock is held
- position
- Int64
The position within the file at which the locked region starts; must be non-negative
- size
- Int64
The size of the locked region; must be non-negative, and the sum
position
+ size
must be non-negative
- shared
- Boolean
true
if this lock is shared,
false
if it is exclusive
- Attributes
Remarks
Initializes a new instance of this class.
Added in 1.7.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
FileLock(FileChannel, Int64, Int64, Boolean)
Initializes a new instance of this class.
[Android.Runtime.Register(".ctor", "(Ljava/nio/channels/FileChannel;JJZ)V", "")]
protected FileLock (Java.Nio.Channels.FileChannel? channel, long position, long size, bool shared);
[<Android.Runtime.Register(".ctor", "(Ljava/nio/channels/FileChannel;JJZ)V", "")>]
new Java.Nio.Channels.FileLock : Java.Nio.Channels.FileChannel * int64 * int64 * bool -> Java.Nio.Channels.FileLock
Parameters
- channel
- FileChannel
The file channel upon whose file this lock is held
- position
- Int64
The position within the file at which the locked region starts; must be non-negative
- size
- Int64
The size of the locked region; must be non-negative, and the sum
position
+ size
must be non-negative
- shared
- Boolean
true
if this lock is shared,
false
if it is exclusive
- Attributes
Remarks
Initializes a new instance of this class.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.