}
// VG: Why exception is not thrown in constructor?
if (this.exception != null) {
throw this.exception;
}
SitemapComponentSelector serializerSelector = null;
Serializer serializer = null;
try {
serializerSelector = (SitemapComponentSelector) this.manager.lookup(Serializer.ROLE + "Selector");
serializer = (Serializer)serializerSelector.select("xml");
ByteArrayOutputStream os = new ByteArrayOutputStream();
serializer.setOutputStream(os);
this.toSAX(serializer);
return new ByteArrayInputStream(os.toByteArray());
} catch (ComponentException cme) {
throw new ProcessingException("could not lookup pipeline components", cme);
} catch (ProcessingException e) {
throw e;
} catch (Exception e) {
throw new ProcessingException("Exception during processing of " + this.systemId, e);
} finally {
if (serializer != null) serializerSelector.release(serializer);
if (serializerSelector != null) this.manager.release(serializerSelector);
reset();
}
}