Ejemplo n.º 1
0
	/**
	 * Reads all the entries from the ZipInputStream 
	 *  into memory, and closes the source stream.
	 * We'll then eat lots of memory, but be able to
	 *  work with the entries at-will.
	 */
	public ZipInputStreamZipEntrySource(ZipInputStream inp){
        zipEntries = new List<FakeZipEntry>();
		
		bool going = true;
		while(going) {
			ZipEntry zipEntry = inp.GetNextEntry();
			if(zipEntry == null) {
				going = false;
			} else {
				FakeZipEntry entry = new FakeZipEntry(zipEntry, inp);
				//inp.Close();

                zipEntries.Add(entry);
			}
		}
		inp.Close();
	}
Ejemplo n.º 2
0
        /**
         * Reads all the entries from the ZipInputStream
         *  into memory, and closes the source stream.
         * We'll then eat lots of memory, but be able to
         *  work with the entries at-will.
         */
        public ZipInputStreamZipEntrySource(ZipInputStream inp)
        {
            zipEntries = new List <FakeZipEntry>();

            bool going = true;

            while (going)
            {
                ZipEntry zipEntry = inp.GetNextEntry();
                if (zipEntry == null)
                {
                    going = false;
                }
                else
                {
                    FakeZipEntry entry = new FakeZipEntry(zipEntry, inp);
                    //inp.Close();

                    zipEntries.Add(entry);
                }
            }
            inp.Close();
        }
Ejemplo n.º 3
0
        public Stream GetInputStream(ZipEntry zipEntry)
        {
            FakeZipEntry entry = (FakeZipEntry)zipEntry;

            return(entry.GetInputStream());
        }