Class FileProvider
java.lang.Object
org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider<File>
org.glassfish.jersey.message.internal.FileProvider
- All Implemented Interfaces:
 MessageBodyReader<File>,MessageBodyWriter<File>
@Produces({"application/octet-stream","*/*"})
@Consumes({"application/octet-stream","*/*"})
@Singleton
public final class FileProvider
extends AbstractMessageReaderWriterProvider<File>
Provider for marshalling/un-marshalling of 
application/octet-stream
 entity type to/from a File instance.- Author:
 - Paul Sandoz, Marek Potociar
 
- 
Field Summary
Fields inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
UTF8 - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionlongbooleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) readFrom(Class<File> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) voidwriteTo(File t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) Methods inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
getCharset, readFromAsString, writeTo, writeTo, writeToAsString 
- 
Constructor Details
- 
FileProvider
public FileProvider() 
 - 
 - 
Method Details
- 
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)  - 
readFrom
public File readFrom(Class<File> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException- Throws:
 IOException
 - 
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)  - 
writeTo
public void writeTo(File t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException- Throws:
 IOException
 - 
getSize
public long getSize(File t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) - Specified by:
 getSizein interfaceMessageBodyWriter<File>- Overrides:
 getSizein classAbstractMessageReaderWriterProvider<File>
 
 -