转换的InputStream的FileInputStream?InputStream、FileInputStream

由网友(思春的虫子蠢蠢欲动)分享简介:我在一个问题 - 我需要阅读SecretKey的从安卓APK(如key.keystore),我的应用程序它必须被理解为一个FileInputStream,但是从资产我只得到的InputStream。如何为InputStream转换成的FileInputStream?或者有没有其他的办法,如何从存取权限,例如文件资源为一...

我在一个问题 - 我需要阅读SecretKey的从安卓APK(如key.keystore),我的应用程序它必须被理解为一个FileInputStream,但是从资产我只得到的InputStream。如何为InputStream转换成的FileInputStream?或者有没有其他的办法,如何从存取权限,例如文件资源为一个FileInputStream?

I am in a problem - i need to read SecretKey from Android APK (e.g. key.keystore), for my app it has to be read as a FileInputStream, but from assets I am getting only inputStream. How to convert inputStream to FileInputStream? Or is there any other way, how to acces file from e.g. resources as a fileInputStream?

感谢

推荐答案

为什么需要一个FileInputStream具体一点吗?一般情况下,你不必关心的InputStream的底层实现,你只是从它读。也许的您的实施应该是不可知的InputStream

Why do you need a FileInputStream specifically? In general, you don't have to care about the underlying implementation of the InputStream, you just read from it. Maybe your implementation should be InputStream agnostic.

阅读全文

相关推荐

最新文章