下载和保存文件的AIR for iOS的 [英] Downloading and saving files with AIR for iOs

查看:227
本文介绍了下载和保存文件的AIR for iOS的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关,我们需要通过AIR的iOS应用程序下载和保存PDF文件的iPad设备供离线使用的一个项目。 很多搜索后我还没有发现关于这个问题的信息。我的问题是,能不能做到,如果是这样,你能为我们提供一些指引,带领我们在正确的方向。

For a project we need to download and save pdf files on an IPAD device for offline use through an AIR for iOs application. After a lot of searching I haven't found much information on this subject. My question is, can it be done, and if so, can you provide us with some pointers to lead us in the right direction.

感谢您的时间!

推荐答案

当然,首先检查是否可以访问网络 - 可以使用一类像 air.net.URLMonitor ,如果你能,你可以设置一个 URLStream 实例。

Sure, first you check if you can access the web - can use a class like air.net.URLMonitor, if you can you can set up a URLStream instance.

您获得,而其在下载使用进度事件的文件数据,使用的FileStream 类编写到一个文件实例。

You get data while its downloading the file using the progress event, write that out to a File instance using the FileStream class.

要显示的PDF文件,你可以使用的StageWebView 的HTMLLoader

To display the PDF file you can use a StageWebView or HTMLLoader.

这篇关于下载和保存文件的AIR for iOS的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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