Package android.os
Class ParcelFileDescriptor.AutoCloseOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FileOutputStream
-
- android.os.ParcelFileDescriptor.AutoCloseOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Enclosing class:
- ParcelFileDescriptor
public static class ParcelFileDescriptor.AutoCloseOutputStream extends FileOutputStream
An OutputStream you can create on a ParcelFileDescriptor, which will take care of callingParcelFileDescriptor.close()for you when the stream is closed.
-
-
Constructor Summary
Constructors Constructor Description AutoCloseOutputStream(ParcelFileDescriptor pfd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes this stream.-
Methods inherited from class java.io.FileOutputStream
finalize, getChannel, getFD, write, write
-
Methods inherited from class java.io.OutputStream
flush, write
-
-
-
-
Constructor Detail
-
AutoCloseOutputStream
public AutoCloseOutputStream(ParcelFileDescriptor pfd)
-
-
Method Detail
-
close
public void close() throws IOExceptionDescription copied from class:OutputStreamCloses this stream. Implementations of this method should free any resources used by the stream. This implementation does nothing.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFileOutputStream- Throws:
IOException- if an error occurs while closing this stream.
-
-