Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String, Object> httpHeaders,
OutputStream entityStream) throws IOException, WebApplicationException {
try {
ObjectFactory objectFactory = new ObjectFactory();
JAXBElement<AppCategories> feedElement = objectFactory.createCategories(t);
Marshaller marshaller = AppCategories.getMarshaller();
marshaller.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));
AtomJAXBUtils.marshal(marshaller, feedElement, entityStream);
} catch (PropertyException e) {
throw new WebApplicationException(e);