Java android.os ParcelFileDescriptor fields, constructors, methods, implement or subclass

Example usage for Java android.os ParcelFileDescriptor fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.os ParcelFileDescriptor.

The text is from its open source code.

Field

intMODE_READ_ONLY
For use with #open : open the file with read-only access.
intMODE_WRITE_ONLY
For use with #open : open the file with write-only access.
intMODE_READ_WRITE
For use with #open : open the file with read and write access.
intMODE_CREATE
For use with #open : create the file if it doesn't already exist.
intMODE_TRUNCATE
For use with #open : erase contents of file when opening.
intMODE_APPEND
For use with #open : append to end of file while writing.

Method

ParcelFileDescriptoradoptFd(int fd)
Take ownership of a raw native fd in to a new ParcelFileDescriptor.
voidcheckError()
Detect and throw if the other end of a pipe or socket pair encountered an error or crashed.
voidclose()
Close the ParcelFileDescriptor.
voidcloseWithError(String msg)
Close the ParcelFileDescriptor, informing any peer that an error occurred while processing.
ParcelFileDescriptor[]createPipe()
Create two ParcelFileDescriptors structured as a data pipe.
ParcelFileDescriptor[]createReliablePipe()
Create two ParcelFileDescriptors structured as a data pipe.
intdetachFd()
Return the native fd int for this ParcelFileDescriptor and detach it from the object here.
intgetFd()
Return the native fd int for this ParcelFileDescriptor.
FileDescriptorgetFileDescriptor()
Retrieve the actual FileDescriptor associated with this object.
longgetStatSize()
Return the total size of the file representing this fd, as determined by stat() .
inthashCode()
Returns a hash code value for the object.
ParcelFileDescriptoropen(File file, int mode)
Create a new ParcelFileDescriptor accessing a given file.
ParcelFileDescriptoropen(File file, int mode, Handler handler, final OnCloseListener listener)
Create a new ParcelFileDescriptor accessing a given file.
intparseMode(String mode)
Converts a string representing a file mode, such as "rw", into a bitmask suitable for use with #open .