startEvent.publish();
if (type.equals(Filetype.ZippedPackage)){
final ZipPartStore partLoader = new ZipPartStore(is);
final Load3 loader = new Load3(partLoader);
OpcPackage opcPackage = loader.get();
if (pkgIdentifier!=null) {
opcPackage.setName(pkgIdentifier.name());
}
new EventFinished(startEvent).publish();
return opcPackage;
// final LoadFromZipNG loader = new LoadFromZipNG();
// return loader.get(is);
} else if (type.equals(Filetype.Compound)){
try {
POIFSFileSystem fs = new POIFSFileSystem(is);
EncryptionInfo info = new EncryptionInfo(fs);
Decryptor d = Decryptor.getInstance(info);
d.verifyPassword(password);
InputStream is2 = d.getDataStream(fs);
final LoadFromZipNG loader = new LoadFromZipNG();
return loader.get(is2);
} catch (java.security.InvalidKeyException e) {
/* Wrong password results in:
*
Caused by: java.security.InvalidKeyException: No installed provider supports this key: (null)