FileLock 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| FileLock(IntPtr, JniHandleOwnership) |
建立 JNI 物件的 Managed 表示法時使用的建構函式;由運行時間呼叫。 |
| FileLock(AsynchronousFileChannel, Int64, Int64, Boolean) |
初始化此類別的新實例。 |
| FileLock(FileChannel, Int64, Int64, Boolean) |
初始化此類別的新實例。 |
FileLock(IntPtr, JniHandleOwnership)
建立 JNI 物件的 Managed 表示法時使用的建構函式;由運行時間呼叫。
protected FileLock(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Nio.Channels.FileLock : nativeint * Android.Runtime.JniHandleOwnership -> Java.Nio.Channels.FileLock
參數
- transfer
- JniHandleOwnership
JniHandleOwnershipA 指示如何處理javaReference
備註
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
FileLock(AsynchronousFileChannel, Int64, Int64, Boolean)
初始化此類別的新實例。
[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
參數
- channel
- AsynchronousFileChannel
此鎖所存放檔案的通道
- position
- Int64
鎖定區域在檔案中開始的位置;必須是非負數
- size
- Int64
鎖定區域的大小;必須是非負的,且 position和 + size 必須非負
- shared
- Boolean
true 如果這個鎖是共享的,如果 false 它是排他的
- 屬性
備註
初始化此類別的新實例。
在 1.7 版本中加入。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
FileLock(FileChannel, Int64, Int64, Boolean)
初始化此類別的新實例。
[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
參數
- channel
- FileChannel
該鎖所持有檔案的檔案通道
- position
- Int64
鎖定區域在檔案中開始的位置;必須是非負數
- size
- Int64
鎖定區域的大小;必須是非負的,且 position和 + size 必須非負
- shared
- Boolean
true 如果這個鎖是共享的,如果 false 它是排他的
- 屬性
備註
初始化此類別的新實例。
Java 文件 java.nio.channels.FileLock.FileLock(java.nio.channels.FileChannel, long, long, boolean)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。