自定义的ContentProvider - openInputStream(),openOutputStream()自定义、ContentProvider、openOutputStream、ope

由网友(无所谓 没形象)分享简介:在内容提供商/解析器API提供使用URI和进程间传输数据的复杂,但强大的方式 openInputStream()和 openOutputStream ()的方法。自定义内容供应商必须使用自定义code重写中openFile()的方法,有效地解决URI成流的能力;然而,该方法签名中openFile()有一个 Parcel...

在内容提供商/解析器API提供使用URI和进程间传输数据的复杂,但强大的方式 openInputStream() openOutputStream ()的方法。自定义内容供应商必须使用自定义code重写中openFile()的方法,有效地解决URI成流的能力;然而,该方法签名中openFile()有一个 ParcelFileDescriptor 返回类型,它目前还不清楚人们可能产生对于动态生成的内容,从这个方法返回正确的重新presentation。

The content provider/ resolver APIs provide a complicated, but robust way of transferring data between processes using a URI and the openInputStream() and openOutputStream() methods. Custom content providers have the ability to override the openFile() method with custom code to effectively resolve a URI into a Stream; however, the method signature of openFile() has a ParcelFileDescriptor return type and it is not clear how one might generate a proper representation for dynamically generated content to return from this method.

Returning内存映射的InputStream从内容提供商?

是否有实施 ContentProvider.openFile()方法,在现有的code碱基动态内容的例子吗?如果没有,你可以提示源$ C ​​$ C或处理这样做?

Are there examples of implementing ContentProvider.openFile() method for dynamic content in the existing code base? If not can you suggest source code or process for doing so?

推荐答案

MemoryFile支持这一点,但公共API还没有最后确定。

MemoryFile supports this, but the public API hasn't been finalized.

阅读全文

相关推荐

最新文章