All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.skjolber.unzip.ByteArrayZipFileFactory Maven / Gradle / Ivy

There is a newer version: 1.0.10
Show newest version
package com.github.skjolber.unzip;

import java.io.IOException;

import org.apache.commons.compress.archivers.zip.ZipFile;
import org.apache.commons.compress.utils.SeekableInMemoryByteChannel;

public class ByteArrayZipFileFactory implements ZipFileSource {

	protected byte[] buf;

	public ByteArrayZipFileFactory(byte[] buf) {
		this.buf = buf;
	}

	public ZipFile getZipFile() throws IOException {
		return new ZipFile(new SeekableInMemoryByteChannel(buf));
	}
	
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy