use of com.ibm.dtfj.corereaders.ResourceReleaser in project openj9 by eclipse.
the class DTFJImageFactory method getImage.
private ReleasingImage getImage(File imageFile, InputStream metadata, IFileLocationResolver resolver) throws IOException {
ClosingFileReader reader = new ClosingFileReader(imageFile);
ICoreFileReader core = DumpFactory.createDumpForCore(reader);
XMLIndexReader indexData = new XMLIndexReader();
// CMVC 154851 : pass the metadata stream through the new XML cleanup class
XMLInputStream in = new XMLInputStream(metadata);
ReleasingImage image = indexData.parseIndexWithDump(in, core, reader, resolver);
image.addReleasable(in);
image.addReleasable(reader);
image.addReleasable(core);
if (resolver instanceof ResourceReleaser) {
image.addReleasable((ResourceReleaser) resolver);
}
return image;
}
Aggregations