Class DataSourceProvider
- java.lang.Object
-
- org.restlet.ext.jaxrs.internal.provider.AbstractProvider<javax.activation.DataSource>
-
- org.restlet.ext.jaxrs.internal.provider.DataSourceProvider
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<javax.activation.DataSource>,javax.ws.rs.ext.MessageBodyWriter<javax.activation.DataSource>
@Deprecated @Provider public class DataSourceProvider extends AbstractProvider<javax.activation.DataSource>
Deprecated.Will be removed in next minor release.Provider forDataSources.
-
-
Constructor Summary
Constructors Constructor Description DataSourceProvider()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longgetSize(javax.activation.DataSource t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)Deprecated.Returns the size of the given objects.javax.activation.DataSourcereadFrom(java.lang.Class<javax.activation.DataSource> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream)Deprecated.protected java.lang.Class<?>supportedClass()Deprecated.Returns the class object supported by this provider.voidwriteTo(javax.activation.DataSource dataSource, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)Deprecated.-
Methods inherited from class org.restlet.ext.jaxrs.internal.provider.AbstractProvider
isReadable, isWriteable, logAndIOExc
-
-
-
-
Method Detail
-
getSize
public long getSize(javax.activation.DataSource t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)Deprecated.Description copied from class:AbstractProviderReturns the size of the given objects.- Specified by:
getSizein interfacejavax.ws.rs.ext.MessageBodyWriter<javax.activation.DataSource>- Specified by:
getSizein classAbstractProvider<javax.activation.DataSource>- Parameters:
t- the object to check the size- Returns:
- the size of the object, or -1, if it is not direct readable from the object.
- See Also:
MessageBodyWriter.getSize(java.lang.Object, java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType)
-
readFrom
public javax.activation.DataSource readFrom(java.lang.Class<javax.activation.DataSource> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream) throws java.io.IOExceptionDeprecated.- Specified by:
readFromin interfacejavax.ws.rs.ext.MessageBodyReader<javax.activation.DataSource>- Specified by:
readFromin classAbstractProvider<javax.activation.DataSource>genericType- The genericTypeto convert to.annotations- the annotations of the artefact to convert to- Throws:
java.io.IOException- See Also:
MessageBodyReader#readFrom(Class, Type, MediaType, Annotation[], MultivaluedMap, InputStream)
-
supportedClass
protected java.lang.Class<?> supportedClass()
Deprecated.Description copied from class:AbstractProviderReturns the class object supported by this provider.- Overrides:
supportedClassin classAbstractProvider<javax.activation.DataSource>- Returns:
- the class object supported by this provider.
-
writeTo
public void writeTo(javax.activation.DataSource dataSource, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream) throws java.io.IOExceptionDeprecated.- Specified by:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<javax.activation.DataSource>- Specified by:
writeToin classAbstractProvider<javax.activation.DataSource>- Throws:
java.io.IOException- See Also:
MessageBodyWriter.writeTo(Object, Class, Type, Annotation[], MediaType, MultivaluedMap, OutputStream)
-
-