2013-06-04 4 views
0

Je veux décompresser un fichier sous Android en utilisant Monodroid. Je peux obtenir mon ZipEntry avec la propriété NextEntry, mais maintenant j'ai vraiment besoin de convertir ce ZipEntry en un simple Stream.ZipEntry pour diffuser avec monodroid

EDIT:

Une partie de mon code

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 
       } 
... 

Merci

Répondre

0

Si vous utilisez Ionic.Zip, vous pouvez l'obtenir facilement: zipentry.InputStream

+0

Salut , Je n'utilise pas Ionic.Zip donc je n'ai pas la propriété InputStream – Podelo

+0

Alors qu'est-ce que vous utilisez? – Roosevelt

+0

J'ai ajouté du code – Podelo