fos = new FileOutputStream(archive);
fos.write(archiveContent);
fos.flush();
} catch (Exception ioe) {
logger.error("Error while writing archive content into a tmp file ", ioe);
throw new EMFUserError(EMFErrorSeverity.ERROR, "8004", "component_impexp_messages");
} finally {
if (fos != null) {
try {
fos.close();
} catch (IOException e) {
logger.error("Error while closing stream", e);
}
}
}
// decompress archive
ImportUtilities.decompressArchive(pathImpTmpFold, pathArchiveFile);
// erase archive file
archive.delete();
int lastDotPos = archiveName.lastIndexOf(".");
if (lastDotPos != -1)
archiveName = archiveName.substring(0, lastDotPos);
pathImportTmpFolder = pathImpTmpFold;
pathBaseFolder = pathImportTmpFolder + "/" + archiveName;
pathDBFolder = pathBaseFolder + "/metadata";
String propFilePath = pathBaseFolder + "/export.properties";
FileInputStream fis = null;
try {
fis = new FileInputStream(propFilePath);
props = new Properties();
props.load(fis);
} catch (Exception e) {
logger.error("Error while reading properties file ", e);
throw new EMFUserError(EMFErrorSeverity.ERROR, "8004", "component_impexp_messages");
} finally {
if (fis != null)
try {
fis.close();
} catch (IOException e) {