Example usage for org.apache.poi.openxml4j.util ZipFileZipEntrySource ZipFileZipEntrySource

List of usage examples for org.apache.poi.openxml4j.util ZipFileZipEntrySource ZipFileZipEntrySource

Introduction

In this page you can find the example usage for org.apache.poi.openxml4j.util ZipFileZipEntrySource ZipFileZipEntrySource.

Prototype

public ZipFileZipEntrySource(ZipFile zipFile) 

Source Link

Usage

From source file:org.dhatim.fastexcel.reader.ReadableWorkbook.java

License:Apache License

private static OPCPackage open(InputStream in) throws IOException {
    try {//from   ww w .j  a v  a  2  s.  c  o  m
        byte[] compressedBytes = IOUtils.toByteArray(in);
        ZipFile zipFile = new ZipFile(new SeekableInMemoryByteChannel(compressedBytes));
        return OPCPackage.open(new ZipFileZipEntrySource(zipFile));
    } catch (InvalidFormatException e) {
        throw new ExcelReaderException(e);
    }
}