Class of android.os · ParcelFileDescriptor.java · Android's reference
public class ParcelFileDescriptor implements Parcelable, Closeable
An open file, as a descriptor that could go to another process.
public static final int MODE_READ_ONLY = 0x10000000 sourcepublic static final int MODE_WRITE_ONLY = 0x20000000 sourcepublic static final int MODE_READ_WRITE = 0x30000000 sourcepublic static final int MODE_CREATE = 0x08000000 sourcepublic static final int MODE_TRUNCATE = 0x04000000 sourcepublic static final int MODE_APPEND = 0x02000000 sourcepublic static final Parcelable.Creator<ParcelFileDescriptor> CREATOR sourcepublic static ParcelFileDescriptor open(File f, int mode) throws FileNotFoundException sourcepublic static int parseMode(String mode) sourcepublic FileDescriptor getFileDescriptor() sourcepublic int getFd() sourcethe host's descriptor, which the app's native code reads as on a device
public long getStatSize() sourcepublic RandomAccessFile file() sourcethe RandomAccessFile that opened the file, null for one made of a descriptor
public void close() throws IOException sourcepublic int detachFd() sourceThe caller owns the descriptor from now on, and this object is closed: the descriptor given is a duplicate of this one's, which closes, so that no Java object (nor its cleaner) closes what the caller owns
public static ParcelFileDescriptor fromFd(int fd) throws IOException sourceA duplicate of a descriptor of the host, which the caller keeps
public static ParcelFileDescriptor adoptFd(int fd) sourceA descriptor of the host, which this object owns from now on
public static ParcelFileDescriptor dup(FileDescriptor orig) throws IOException sourcepublic ParcelFileDescriptor dup() throws IOException sourcepublic static ParcelFileDescriptor fromDatagramSocket(java.net.DatagramSocket datagramSocket) sourceA Java socket gives no descriptor to duplicate, as a socket without one.
public int describeContents() sourcepublic void writeToParcel(Parcel out, int flags) sourceMade from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.