Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
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, int offset, int count)
Writes count bytes from the byte array buffer starting at position offset to this stream.
void write (byte[] buffer)
Equivalent to write(buffer, 0, buffer.length) .
void write (int oneByte)
Writes a single byte 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
From interface java.lang.AutoCloseable

Public Constructors

public AssetFileDescriptor.AutoCloseOutputStream ( AssetFileDescriptor fd)

Added in API level 3

Public Methods

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

Added in API level 3

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

Parameters
buffer the buffer to be written.
offset the start position in buffer from where to get bytes.
count the number of bytes from buffer to write to this stream.

public void write (byte[] buffer)

Added in API level 3

Equivalent to write(buffer, 0, buffer.length) .

public void write (int oneByte)

Added in API level 3

Writes a single byte to this stream. Only the least significant byte of the integer oneByte is written to the stream.

Parameters
oneByte the byte to be written.