Class FileProvider
- java.lang.Object
-
- org.restlet.ext.jaxrs.internal.provider.AbstractProvider<java.io.File>
-
- org.restlet.ext.jaxrs.internal.provider.FileProvider
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<java.io.File>,javax.ws.rs.ext.MessageBodyWriter<java.io.File>
@Deprecated @Provider public class FileProvider extends AbstractProvider<java.io.File>
Deprecated.Will be removed in next minor release.This Provider reads or writesFiles.
-
-
Constructor Summary
Constructors Constructor Description FileProvider()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longgetSize(java.io.File 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.java.io.FilereadFrom(java.lang.Class<java.io.File> 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(java.io.File file, 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(java.io.File 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<java.io.File>- Specified by:
getSizein classAbstractProvider<java.io.File>- 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:
javax.ws.rs.ext.MessageBodyWriter#getSize(java.lang.Object)
-
readFrom
public java.io.File readFrom(java.lang.Class<java.io.File> 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<java.io.File>- Specified by:
readFromin classAbstractProvider<java.io.File>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<java.io.File>- Returns:
- the class object supported by this provider.
- See Also:
AbstractProvider.supportedClass()
-
writeTo
public void writeTo(java.io.File file, 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<java.io.File>- Specified by:
writeToin classAbstractProvider<java.io.File>- Throws:
java.io.IOException- See Also:
MessageBodyWriter.writeTo(Object, Class, Type, Annotation[], MediaType, MultivaluedMap, OutputStream)
-
-