public static class AssetFileDescriptor.AutoCloseOutputStream extends ParcelFileDescriptor.AutoCloseOutputStream
ParcelFileDescritor.close()
for you when the stream is closed.Constructor and Description |
---|
AutoCloseOutputStream(AssetFileDescriptor fd) |
Modifier and Type | Method and Description |
---|---|
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.
|
close
finalize, getChannel, getFD
flush
public AutoCloseOutputStream(AssetFileDescriptor fd) throws IOException
IOException
public void write(byte[] buffer, int offset, int count) throws IOException
FileOutputStream
len
bytes from the specified byte array
starting at offset off
to this file output stream.write
in class FileOutputStream
buffer
- the data.offset
- the start offset in the data.count
- the number of bytes to write.IOException
- if an I/O error occurs.public void write(byte[] buffer) throws IOException
FileOutputStream
b.length
bytes from the specified byte array
to this file output stream.write
in class FileOutputStream
buffer
- the data.IOException
- if an I/O error occurs.OutputStream.write(byte[], int, int)
public void write(int oneByte) throws IOException
FileOutputStream
write
method of OutputStream
.write
in class FileOutputStream
oneByte
- the byte to be written.IOException
- if an I/O error occurs.