Most visited

Recently visited

Added in API level 1

ParcelFileDescriptor.AutoCloseOutputStream

public static class ParcelFileDescriptor.AutoCloseOutputStream
extends FileOutputStream

java.lang.Object
   ↳ java.io.OutputStream
     ↳ java.io.FileOutputStream
       ↳ android.os.ParcelFileDescriptor.AutoCloseOutputStream
Known Direct Subclasses


您可以在ParcelFileDescriptor上创建一个OutputStream,它将负责在流关闭时为您调用 ParcelFileDescriptor.close()

Summary

Public constructors

ParcelFileDescriptor.AutoCloseOutputStream(ParcelFileDescriptor pfd)

Public methods

void close()

关闭此文件输出流并释放与此流关联的所有系统资源。

Inherited methods

From class java.io.FileOutputStream
From class java.io.OutputStream
From class java.lang.Object
From interface java.io.Closeable
From interface java.io.Flushable
From interface java.lang.AutoCloseable

Public constructors

ParcelFileDescriptor.AutoCloseOutputStream

Added in API level 1
ParcelFileDescriptor.AutoCloseOutputStream (ParcelFileDescriptor pfd)

Parameters
pfd ParcelFileDescriptor

Public methods

close

Added in API level 1
void close ()

关闭此文件输出流并释放与此流关联的所有系统资源。 该文件输出流可能不再用于写入字节。

如果此流具有关联的频道,那么该频道也会关闭。

Throws
IOException

Hooray!