简体   繁体   English

如何获取 pdf 文件 uri taht 存储在 assets 文件夹中,并且正在从assetmanager 获取 InputStream。 那么如何从该输入流中获取pdf uri?

[英]how to get pdf files uri taht is stored in assets folder and am getting InputStream from assetmanager. so how to get pdf uri from that inputstream?

returning inputstream .返回输入流 so how can I get my pdf files URI?那么如何获取我的 pdf 文件 URI?

assetmanager.open("filename.pdf")

You can't get the pdf uri from inputstream.您无法从输入流中获取 pdf uri。 to get that, you need to write a file from InputStream, and then you can get a uri from the file.为此,您需要从 InputStream 中写入一个文件,然后您可以从该文件中获取一个 uri。 #1: To write a file from InputStream #2: To get a uri from the file #1:从 InputStream 中写入文件 #2:从文件中获取 uri

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM