org.jboss.resteasy.plugins.providers.SourceProvider Maven / Gradle / Ivy
package org.jboss.resteasy.plugins.providers;
import org.jboss.resteasy.resteasy_jaxrs.i18n.LogMessages;
import org.jboss.resteasy.util.NoContent;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import javax.ws.rs.Consumes;
import javax.ws.rs.InternalServerErrorException;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.Provider;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.Source;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
/**
* @author BillBurke
* @version $Revision: 1 $
*/
@Provider
@Produces({MediaType.TEXT_XML, "application/xml", "application/*+xml"})
@Consumes({MediaType.TEXT_XML, "application/xml", "application/*+xml"})
public class SourceProvider implements MessageBodyReader