android.os.ParcelFileDescriptor
The FileDescriptor returned by readFileDescriptor(), allowing
you to close it when done with it.
Nested Classes
Summary
Constants
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Constants
public
static
final
Creator
CREATOR
public
static
final
int
MODE_CREATE
For use with
open(File, int): create the file if it doesn't already exist.
Constant Value:
2
(0x00000002)
public
static
final
int
MODE_READ
For use with
open(File, int): open the file with read access.
Constant Value:
0
(0x00000000)
public
static
final
int
MODE_READ_WRITE
For use with
open(File, int): open the file with read and write access.
Constant Value:
1
(0x00000001)
public
static
final
int
MODE_TRUNCATE
For use with
open(File, int): erase contents of file when opening.
Constant Value:
4
(0x00000004)
Public Methods
public
void
close()
Close the ParcelFileDescriptor. This implementation closes the underlying
OS resources allocated to represent this stream.
Throws
| IOException
| If an error occurs attempting to close this ParcelFileDescriptor.
|
Retrieve the actual FileDescriptor associated with this object.
Returns
- Returns the FileDescriptor associated with this object.
Create a new ParcelFileDescriptor accessing a given file.
Returns
- Returns a new ParcelFileDescriptor pointing to the given
file.
Throws
| FileNotFoundException
| Throws FileNotFoundException if the given
file does not exist or can not be opened with the requested mode.
|
public
String
toString()
Answers a string containing a concise, human-readable description of the
receiver.
public
void
writeToParcel(Parcel out)