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

Class Overview

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 the entire contents of the byte array buffer to this stream.
void write(int oneByte)
Writes the specified byte oneByte to this stream.
void write(byte[] buffer, int offset, int count)
Writes count bytes from the byte array buffer starting at offset to this stream.
[Expand]
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

Public Constructors

public AssetFileDescriptor.AutoCloseOutputStream (AssetFileDescriptor fd)

Throws
IOException

Public Methods

public void write (byte[] buffer)

Writes the entire contents of the byte array buffer to this stream.

Parameters
buffer the buffer to be written to the file.
Throws
IOException

public void write (int oneByte)

Writes the specified byte oneByte to this stream. Only the low order byte of the integer oneByte is written.

Parameters
oneByte the byte to be written.
Throws
IOException

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

Writes count bytes from the byte array buffer starting at offset to this stream.

Parameters
buffer the buffer to write to this stream.
offset the index of the first byte in buffer to write.
count the number of bytes from buffer to write.
Throws
IOException