Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I read about ParcelFileDescriptor from below link.

http://developer.android.com/reference/android/os/ParcelFileDescriptor.html

but I haven't got any idea from it. What is it? and What can it do?

Can anyone explain me?

question from:https://stackoverflow.com/questions/6715898/what-is-parcelfiledescriptor-in-android

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
229 views
Welcome To Ask or Share your Answers For Others

1 Answer

What it is?

A file descriptor is an object that a process uses to read or write to an open file and open network sockets.

FileDescriptor objects, representing raw Linux file descriptor identifiers, can be written and ParcelFileDescriptor objects returned to operate on the original file descriptor. The returned file descriptor is a dup of the original file descriptor: the object and fd is different, but operating on the same underlying file stream, with the same position.

and What can it do?

Create pipes, create fds from sockets, open/close files.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...