use of org.apache.poi.openxml4j.util.ZipSecureFile in project poi by apache.
the class TestPackage method testConstructors.
@Test
public void testConstructors() throws IOException {
// verify the various ways to construct a ZipSecureFile
File file = OpenXML4JTestDataSamples.getSampleFile("sample.xlsx");
ZipSecureFile zipFile = new ZipSecureFile(file);
assertNotNull(zipFile.getName());
zipFile.close();
zipFile = new ZipSecureFile(file, ZipFile.OPEN_READ);
assertNotNull(zipFile.getName());
zipFile.close();
zipFile = new ZipSecureFile(file.getAbsolutePath());
assertNotNull(zipFile.getName());
zipFile.close();
}
Aggregations