Class DataSourceEntityProvider
java.lang.Object
org.exoplatform.services.rest.impl.provider.DataSourceEntityProvider
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<javax.activation.DataSource>,javax.ws.rs.ext.MessageBodyWriter<javax.activation.DataSource>,EntityProvider<javax.activation.DataSource>
@Provider
public class DataSourceEntityProvider
extends Object
implements EntityProvider<javax.activation.DataSource>
- Version:
- $Id: $
- Author:
- Andrey Parfonov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(javax.activation.DataSource t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) booleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) javax.activation.DataSourcereadFrom(Class<javax.activation.DataSource> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) voidwriteTo(javax.activation.DataSource t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Constructor Details
-
DataSourceEntityProvider
public DataSourceEntityProvider()
-
-
Method Details
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
isReadablein interfacejavax.ws.rs.ext.MessageBodyReader<javax.activation.DataSource>
-
readFrom
public javax.activation.DataSource readFrom(Class<javax.activation.DataSource> 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:
readFromin interfacejavax.ws.rs.ext.MessageBodyReader<javax.activation.DataSource>- Throws:
IOException
-
getSize
public long getSize(javax.activation.DataSource t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejavax.ws.rs.ext.MessageBodyWriter<javax.activation.DataSource>
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter<javax.activation.DataSource>
-
writeTo
public void writeTo(javax.activation.DataSource t, 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:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<javax.activation.DataSource>- Throws:
IOException
-