public void writeTo(Object obj, Class<?> type, Type genericType, Annotation[] anns,
MediaType m, MultivaluedMap<String, Object> headers, OutputStream os)
throws IOException {
AegisContext context = getAegisContext(type, genericType);
AegisWriter<XMLStreamWriter> aegisWriter = context.createXMLStreamWriter();
XMLStreamWriter xmlStreamWriter = StaxUtils.createXMLStreamWriter(os);
try {
aegisWriter.write(obj, null, false, xmlStreamWriter, null);
} catch (Exception e) {