Added in API level 3

AutoCloseOutputStream

open class AutoCloseOutputStream : ParcelFileDescriptor.AutoCloseOutputStream
kotlin.Any
   ↳ java.io.OutputStream
   ↳ java.io.FileOutputStream
   ↳ android.os.ParcelFileDescriptor.AutoCloseOutputStream
   ↳ android.content.res.AssetFileDescriptor.AutoCloseOutputStream

An OutputStream you can create on a ParcelFileDescriptor, which will take care of calling android.os.ParcelFileDescriptor#close for you when the stream is closed.

Summary

Public constructors

Public methods
open Unit
write(buffer: ByteArray!, offset: Int, count: Int)

open Unit
write(buffer: ByteArray!)

open Unit
write(oneByte: Int)

Inherited functions

Public constructors

AutoCloseOutputStream

Added in API level 3
AutoCloseOutputStream(fd: AssetFileDescriptor!)

Public methods

write

Added in API level 3
open fun write(
    buffer: ByteArray!,
    offset: Int,
    count: Int
): Unit
Parameters
b the data.
off the start offset in the data.
len the number of bytes to write.
Exceptions
java.io.IOException if an I/O error occurs. In particular, an IOException is thrown if the output stream is closed.

write

Added in API level 3
open fun write(buffer: ByteArray!): Unit
Parameters
b the data.
Exceptions
java.io.IOException if an I/O error occurs.

write

Added in API level 3
open fun write(oneByte: Int): Unit
Parameters
b the byte to be written.
Exceptions
java.io.IOException if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.