FileUtils.CloseQuietly 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| CloseQuietly(FileDescriptor) |
安靜地關閉給定的物件,忽略任何已勾選的例外。 |
| CloseQuietly(IAutoCloseable) |
安靜地關閉給定的物件,忽略任何已勾選的例外。 |
CloseQuietly(FileDescriptor)
安靜地關閉給定的物件,忽略任何已勾選的例外。
[Android.Runtime.Register("closeQuietly", "(Ljava/io/FileDescriptor;)V", "", ApiSince=29)]
public static void CloseQuietly(Java.IO.FileDescriptor? fd);
[<Android.Runtime.Register("closeQuietly", "(Ljava/io/FileDescriptor;)V", "", ApiSince=29)>]
static member CloseQuietly : Java.IO.FileDescriptor -> unit
參數
值可能是 Null。
- 屬性
備註
安靜地關閉給定的物件,忽略任何已勾選的例外。 若給定物件為 null,則不起作用。
此會員已被棄用。 此方法可能抑制潛在重大例外,特別是在關閉可寫資源時。 對於可寫資源,從 丟出的 close() 失敗應被視為與寫入方法的失敗同等重要,因為這可能表示未能將位元組清除到底層資源。
Java 文件 android.os.FileUtils.closeQuietly(java.io.FileDescriptor)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
CloseQuietly(IAutoCloseable)
安靜地關閉給定的物件,忽略任何已勾選的例外。
[Android.Runtime.Register("closeQuietly", "(Ljava/lang/AutoCloseable;)V", "", ApiSince=29)]
public static void CloseQuietly(Java.Lang.IAutoCloseable? closeable);
[<Android.Runtime.Register("closeQuietly", "(Ljava/lang/AutoCloseable;)V", "", ApiSince=29)>]
static member CloseQuietly : Java.Lang.IAutoCloseable -> unit
參數
- closeable
- IAutoCloseable
值可能是 Null。
- 屬性
備註
安靜地關閉給定的物件,忽略任何已勾選的例外。 若給定物件為 null,則不起作用。
此會員已被棄用。 此方法可能抑制潛在重大例外,特別是在關閉可寫資源時。 對於可寫資源,從 丟出的 close() 失敗應被視為與寫入方法的失敗同等重要,因為這可能表示未能將位元組清除到底層資源。
Java 文件 android.os.FileUtils.closeQuietly(java.lang.AutoCloseable)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。