if (FORMAT_DOCBX.equals(format)) {
preparator = new DocbxPreparator(includeHelpOption);
} else {
preparator = new ConfPreparator(includeHelpOption);
}
preparator.prepare(action, session, Collections.<Object>singletonList("--help"));
newout.close();
baos.close();
return baos.toString();
} finally {
System.setOut(oldout);