开发者

How can I read the content of a file if I have a ParcelFileDescriptor

开发者 https://www.devze.com 2023-02-15 11:04 出处:网络
In android, I get a ParcelFileDescriptor after 开发者_高级运维I call mContext.getContentResolver().openFileDescriptor(contentURI, \"r\")

In android, I get a ParcelFileDescriptor after 开发者_高级运维I call mContext.getContentResolver().openFileDescriptor(contentURI, "r")

but how can I read the content of the file into a string or Stringbuffer?

Thank you.


I would recommend that you use openInputStream() on ContentResolver instead. Then, you just use normal Java I/O to read it in.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号