public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType m,
MultivaluedMap<String, String> headers, InputStream is)
throws IOException {
AegisContext context = getAegisContext(type, genericType);
AegisReader<XMLStreamReader> aegisReader = context.createXMLStreamReader();
XMLStreamReader xmlStreamReader = StaxUtils.createXMLStreamReader(is);
try {
return aegisReader.read(xmlStreamReader);
} catch (Exception e) {
throw new WebApplicationException(e);