// validate container
in = ocf.getInputStream(OCFData.containerEntry);
parser = new XMLParser(ocf, in, OCFData.containerEntry, "xml", getReport(), version);
XMLHandler handler = new OCFHandler(parser);
parser.addXMLHandler(handler);
parser.addValidator(xmlValidatorMap.get(new OPSType(OCFData.containerEntry, version)));
parser.process();
try
{
if (in != null)
{
in.close();
in = null;
}
}
catch (IOException ignored)
{
// eat it
}
// Validate encryption.xml
if (ocf.hasEntry(OCFData.encryptionEntry))
{
in = ocf.getInputStream(OCFData.encryptionEntry);
parser = new XMLParser(ocf, in, OCFData.encryptionEntry, "xml", getReport(), version);
handler = new EncryptionHandler(ocf, parser);
parser.addXMLHandler(handler);
parser.addValidator(xmlValidatorMap.get(new OPSType(OCFData.encryptionEntry, version)));
parser.process();
try
{
if (in != null)
{
in.close();
in = null;
}
}
catch (IOException ignored)
{
// eat it
}
getReport().info(null, FeatureEnum.HAS_ENCRYPTION, OCFData.encryptionEntry);
}
// validate signatures.xml
if (ocf.hasEntry(OCFData.signatureEntry))
{
in = ocf.getInputStream(OCFData.signatureEntry);
parser = new XMLParser(ocf, in, OCFData.signatureEntry, "xml", getReport(), version);
handler = new OCFHandler(parser);
parser.addXMLHandler(handler);
parser.addValidator(xmlValidatorMap.get(new OPSType(OCFData.signatureEntry, version)));
parser.process();
try
{
in.close();
}