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


一个可以在ParcelFileDescriptor上创建的OutputStream,它可以在流关闭时为您调用 ParcelFileDescritor.close()

Summary

Public constructors

AssetFileDescriptor.AutoCloseOutputStream(AssetFileDescriptor fd)

Public methods

void write(byte[] buffer)

b.length字节从指定的字节数组写入此文件输出流。

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

len字节从指定的字节数组开始偏移 off写入此文件输出流。

void write(int oneByte)

将指定的字节写入此文件输出流。

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)

将指定字节数组的 b.length个字节写入此文件输出流。

Parameters
buffer byte: the data.
Throws
IOException

write

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

len字节从指定的字节数组开始,偏移 off写入此文件输出流。

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)

将指定的字节写入此文件输出流。 实现write的方法OutputStream

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

Hooray!