-
W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
java.lang.Object
|---java.io.OutputStream
|---|---java.io.FileOutputStream
|---|---|---ohos.rpc.ReliableFileDescriptor.AutoCloseFileOutputStream
public static class ReliableFileDescriptor.AutoCloseFileOutputStream
extends FileOutputStream
表示一個(gè)文件輸出流,其文件描述符在此流關(guān)閉時(shí)自動(dòng)關(guān)閉。
此類僅適用于同一設(shè)備上的操作。
構(gòu)造函數(shù) | 描述 |
---|---|
AutoCloseFileOutputStream(ReliableFileDescriptor reliablefd) | 用于使用 ReliableFileDescriptor 對(duì)象創(chuàng)建 AutoCloseFileOutputStream 實(shí)例的構(gòu)造函數(shù)。 |
修飾符和類型 | 方法 | 描述 |
---|---|---|
void | close() | 關(guān)閉此 AutoCloseFileOutputStream 對(duì)象,其 ReliableFileDescriptor 對(duì)象也會(huì)自動(dòng)關(guān)閉。 |
從類 java.io.FileOutputStream 繼承的方法 |
---|
finalize, getChannel, getFD, write, write, write |
從類 java.lang.Object 繼承的方法 |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
從類 java.io.OutputStream 繼承的方法 |
---|
flush |
public AutoCloseFileOutputStream(ReliableFileDescriptor reliablefd)
用于使用 ReliableFileDescriptor 對(duì)象創(chuàng)建 AutoCloseFileOutputStream 實(shí)例的構(gòu)造函數(shù)。
參數(shù):
參數(shù)名稱 | 參數(shù)描述 |
---|---|
reliablefd | 指示要使用的 ReliableFileDescriptor 對(duì)象。 |
public void close() throws IOException
關(guān)閉此 AutoCloseFileOutputStream 對(duì)象,其 ReliableFileDescriptor 對(duì)象也會(huì)自動(dòng)關(guān)閉。
指定者:
在接口 AutoCloseable 中關(guān)閉
指定者:
在接口Closeable中關(guān)閉
覆蓋:
在類 FileOutputStream 中關(guān)閉
Throws:
Throw名稱 | Throw描述 |
---|---|
IOException | 如果發(fā)生 I/O 錯(cuò)誤,則引發(fā)此異常。 |
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: