if (outputStreamMissing) {
throw new FOPException(
"OutputStream has not been set");
}
//Found a Renderer so we need to construct an AreaTreeHandler.
return new AreaTreeHandler(userAgent, outputFormat, out);
} else {
throw new UnsupportedOperationException(
"Don't know how to handle \"" + outputFormat + "\" as an output format."
+ " Neither an FOEventHandler, nor a Renderer could be found"
+ " for this output format.");