将inputStream转换为FileInputStream?

Way*_*int 5 android inputstream fileinputstream

我遇到了问题 - 我需要从Android APK(例如key.keystore)读取SecretKey,对于我的应用程序,它必须被读取为FileInputStream,但是从资产中我只得到inputStream.如何将inputStream转换为FileInputStream?或者有没有其他方法,如何从文件作为fileInputStream访问文件?

谢谢

dmo*_*mon 8

为什么需要专门的FileInputStream?通常,您不必关心InputStream的底层实现,只需从中读取即可.也许你的实现应该是InputStream不可知的.