如何部分来自Web服务器和德code部分来自EN codeD数据下载的Base64的数据? [英] How to download Base64 data partly from web server and decode partly from encoded data?

查看:172
本文介绍了如何部分来自Web服务器和德code部分来自EN codeD数据下载的Base64的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Base64 EN codeD数据是非常大的,并配备动态不固定,从网络服务器上获取每笔交易。所以,我需要获取EN code数据部分和去code部分来自的base64 EN codeD数据。 Base64编码的连接codeD数据是TIFF图像数据。

My Base64 encoded data is very Large and comes dynamic not fixed fetch from web server for every transaction. So i need to fetch encode data partly and decode partly from base64 encoded data. Base64 encoded data is tiff image data.

有关开发这个功能我在创建所有的base64 EN codeD数据从网络服务器和存储下载部分以TXT file.when的所有数据都存储在txt文件一个函数。然后我开始去code数据部分,并创建TIFF图像文件。

For develop this functionality i create one function in which all base64 encoded data download partly from web server and store in txt file.when all data are stored in txt file. then i start decode data partly and create tiff image file.

的base64 EN codeD数据不存储部分(指部分不下载),并只来过一次从Web服务器然后跳闸的base64部分德code成功做工精细和TIFF图像下载...

base64 encoded data not stored partly (means not download partly) and come only once trip from web server then partly base64 decode working fine and tiff image download successfully...

但是,当商店的base64 EN code数据部分(从Web服务器下载部分),以及来自次行程或循环数据下载和存储,部分的base64德code,那么TIFF图像不下载不...工作

But when store base64 encode data partly(download from web server partly) and comes more times trip or loop for downloading data and storing and partly base64 decode then tiff image not download... not working

推荐答案

我不知道,我是否理解你的问题,但我会尝试:

I am not sure, whether I understand your problem, but I will try:


  • 每当1送你去code的base64形象去它的工作原理,但是当你收到它的部件数分期付款,德code失败。如果是这样的话,你必须要聪明约涂胶您收到部分组合在一起。请记住的Base64编码的每个字符重新presents的你不能简单地追加接收到的字符成一个大文件,数组或字符串信息不是8 7位。发送块当请问您的服务器使用的base64填充?

请记住, Android不支持TIFF本身。尝试使用PNG或JPEG。

Please remember that Android does not support TIFF natively. Try using PNG or JPEG.

它将使更多的意义,如果服务器发送它作为二进制数据并且在连接和去$ C $光盘从上飞该流用打开流图像 BitmapFactory

It would make much more sense, if the server sent it as binary data and you opened the stream on the connection and decoded the image from that stream on the fly using BitmapFactory class

这篇关于如何部分来自Web服务器和德code部分来自EN codeD数据下载的Base64的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆