Class SourceProvider
java.lang.Object
org.jboss.resteasy.plugins.providers.SourceProvider
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<Source>
,javax.ws.rs.ext.MessageBodyWriter<Source>
@Provider
@Produces({"text/xml","application/xml","application/*+xml"})
@Consumes({"text/xml","application/xml","application/*+xml"})
public class SourceProvider
extends Object
implements javax.ws.rs.ext.MessageBodyReader<Source>, javax.ws.rs.ext.MessageBodyWriter<Source>
- Version:
- $Revision: 1 $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
getSize
(Source inputStream, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) boolean
isReadable
(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) readFrom
(Class<Source> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) void
writeTo
(Source source, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Constructor Details
-
SourceProvider
public SourceProvider()
-
-
Method Details
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
isReadable
in interfacejavax.ws.rs.ext.MessageBodyReader<Source>
-
readFrom
public Source readFrom(Class<Source> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException- Specified by:
readFrom
in interfacejavax.ws.rs.ext.MessageBodyReader<Source>
- Throws:
IOException
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<Source>
-
getSize
public long getSize(Source inputStream, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<Source>
-
writeTo
public void writeTo(Source source, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException- Specified by:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<Source>
- Throws:
IOException
-