org.jboss.resteasy.plugins.providers
@Provider public class FileProvider extends Object implements MessageBodyReader<File>, MessageBodyWriter<File>
Constructor and Description |
---|
FileProvider() |
Modifier and Type | Method and Description |
---|---|
long |
getSize(File o,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType) |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType) |
File |
readFrom(Class<File> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
void |
writeTo(File uploadFile,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
isReadable
in interface MessageBodyReader<File>
public File readFrom(Class<File> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
readFrom
in interface MessageBodyReader<File>
IOException
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
isWriteable
in interface MessageBodyWriter<File>
public long getSize(File o, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
getSize
in interface MessageBodyWriter<File>
public void writeTo(File uploadFile, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException
writeTo
in interface MessageBodyWriter<File>
IOException
Copyright © 2017. All Rights Reserved.