* getManifest returns (if present) the deployment's manifest
* it is lazy loaded to work from the localURL
*/
public Manifest getManifest()
{
try
{
if (manifest == null)
{
File file = new File(localUrl.getFile());
if (file.isDirectory())
manifest= new Manifest(new FileInputStream(new File(file, "META-INF/MANIFEST.MF")));
else // a jar
manifest = new JarFile(file).getManifest();
}
return manifest;
}
// It is ok to barf at any time in the above, means no manifest
catch (Exception ignored) { return null;}
}
{
try
{
if (manifest == null)
{
File file = new File(localUrl.getFile());
if (file.isDirectory()) {
FileInputStream fis = null;
try {
fis = new FileInputStream(new File(file, "META-INF/MANIFEST.MF"));
manifest= new Manifest(fis);
} finally { // close the input stream
fis.close();
}
} else {// a jar
JarFile jarFile = new JarFile(file);
try {
manifest = jarFile.getManifest();
} finally { // close the JarFile
jarFile.close();
}
}
}
return manifest;
}
// It is ok to barf at any time in the above, means no manifest
catch (Exception ignored) { return null;}
}
This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. If you have received this e-mail in error you must not copy, distribute or take any action in reliance on it. Please notify the sender by e-mail or telephone.
We utilise an anti-virus system and therefore any files sent via e-mail will have been checked for known viruses. You are however advised to run your own virus check before opening any attachments received as we will not in any event accept any liability whatsoever once an e-mail and/or any attachment is received. Any views expressed by an individual within this e-mail do not necessarily reflect the views of Systems Union Group plc or any of its subsidiary companies.
