0
我想使用Monodroid在Android中解壓縮文件。我可以使用Property NextEntry獲取我的ZipEntry,但現在我真的需要將此ZipEntry轉換爲簡單的Stream。ZipEntry to stream with monodroid
編輯:
我的代碼一些部分
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
}
...
感謝
喜,我沒有使用Ionic.Zip,所以我沒有InputStream屬性 – Podelo
然後你在用什麼? – Roosevelt
我添加了一些代碼 – Podelo