}
public HierarchicalStreamWriter createWriter(final OutputStream output) {
try {
if (useSerializeAsArray) {
return new JettisonStaxWriter(new QNameMap(), mof.createXMLStreamWriter(output), convention);
} else {
return new StaxWriter(new QNameMap(), mof.createXMLStreamWriter(output));
}
} catch (final XMLStreamException e) {
throw new StreamException(e);