将CipherInputStream转换为FileInputStream

时间:2015-12-06 11:50:34

标签: android encryption android-mediaplayer android-file nanohttpd

我正在使用nano-httpd来播放加密的mp3文件。我想在飞行中播放加密文件。我应用解密AES-256并将CipherInputStream文件发送到NanoHttpd但它抛出异常。实际上它需要FileInputStream。错误如下所述

return new NanoHTTPD.Response(Response.Status.OK, "audio/mpeg", CipherInputStreamFile); // here it requires FileInputStream File

**Exception**
D/MediaPlayer: Couldn't open file on client side, trying server side
E/MediaPlayer: error (1, -2147483648)
E/MediaPlayer: Error (1,-2147483648)

0 个答案:

没有答案