简体   繁体   English

Android下载Base64编码的数据,对其进行解码并将其保存到文件

[英]Android Download Base64 Encoded data, decode it and save it to file

I need to download Base64 Encoded data from Server using HttpUrlConnection. 我需要使用HttpUrlConnection从Server下载Base64编码数据。 And then decode it and save it to the file. 然后将其解码并保存到文件中。

I have completed task making connection and all. 我已经完成所有任务的建立。 I can get Data in Base64 string fromat from HTTP response body, but need some pointers moving from here. 我可以从HTTP响应正文中从Base64字符串中获取数据,但需要一些从此处移动的指针。 How to decode it and then save it the file. 如何对其进行解码,然后将其保存为文件。

Is Base64InputStrem a good idea ? Base64InputStrem是个好主意吗? then How do I wrap it in File Strem ? 然后如何将其包装在File Strem中?

Thanks for the help. 谢谢您的帮助。

You can use this to decode Base64. 您可以使用来解码Base64。 Saving it to file is more tricky , you need to know where to put it. 将其保存到文件比较棘手 ,您需要知道将其放置在哪里。

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

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