}
protected XMLStreamWriter createWriter(Object actualObject, Class<?> actualClass,
Type genericType, String enc, OutputStream os, boolean isCollection) throws Exception {
QName qname = getQName(actualClass, genericType, actualObject, true);
Configuration c = new Configuration(namespaceMap);
MappedNamespaceConvention convention = new MappedNamespaceConvention(c);
AbstractXMLStreamWriter xsw = new MappedXMLStreamWriter(
convention,
new OutputStreamWriter(os, enc));
if (serializeAsArray) {