Most visited

Recently visited

Added in API level 3

AssetFileDescriptor.AutoCloseOutputStream

public static class AssetFileDescriptor.AutoCloseOutputStream
extends ParcelFileDescriptor.AutoCloseOutputStream

java.lang.Object
   ↳ 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 ParcelFileDescritor.close() for you when the stream is closed.

Summary

Public constructors

AssetFileDescriptor.AutoCloseOutputStream(AssetFileDescriptor fd)

Public methods

void write(byte[] buffer)

Writes b.length bytes from the specified byte array to this file output stream.

void write(byte[] buffer, int offset, int count)

Writes len bytes from the specified byte array starting at offset off to this file output stream.

void write(int oneByte)

Writes the specified byte to this file output stream.

Inherited methods

From class android.os.ParcelFileDescriptor.AutoCloseOutputStream
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

AssetFileDescriptor.AutoCloseOutputStream

Added in API level 3
AssetFileDescriptor.AutoCloseOutputStream (AssetFileDescriptor fd)

Parameters
fd AssetFileDescriptor
Throws
IOException

Public methods

write

Added in API level 3
void write (byte[] buffer)

Writes b.length bytes from the specified byte array to this file output stream.

Parameters
buffer byte: the data.
Throws
IOException

write

Added in API level 3
void write (byte[] buffer, 
                int offset, 
                int count)

Writes len bytes from the specified byte array starting at offset off to this file output stream.

Parameters
buffer byte: the data.
offset int: the start offset in the data.
count int: the number of bytes to write.
Throws
IOException

write

Added in API level 3
void write (int oneByte)

Writes the specified byte to this file output stream. Implements the write method of OutputStream.

Parameters
oneByte int: the byte to be written.
Throws
IOException