【发布时间】:2013-06-04 14:51:45
【问题描述】:
我想在 Android 中使用 Monodroid 解压缩文件。我可以使用 NextEntry 属性获取我的 ZipEntry,但现在我真的需要将此 ZipEntry 转换为简单的 Stream。
编辑:
我的部分代码
using System;
using System.IO;
using Java.Util.Zip;
using File = System.IO.File;
public void ExtractFile(Stream ZipFile, Action<String, Stream> WriteFile)
{
ZipInputStream zis;
try
{
zis = new ZipInputStream(ZipFile);
ZipEntry entry;
byte[] buffer = new byte[1024];
int count;
while ((entry = zis.NextEntry) != null)
{
// HERE I need to call my WriteFile action with a stream
}
...
谢谢
【问题讨论】:
标签: mono zip xamarin.android xamarin mvvmcross