RESTEasy JAX-RS Implementation 2.3.6.Final-redhat-1

org.jboss.resteasy.plugins.providers
Class FileProvider

java.lang.Object
  extended by org.jboss.resteasy.plugins.providers.FileProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<File>, javax.ws.rs.ext.MessageBodyWriter<File>

@Provider
public class FileProvider
extends Object
implements javax.ws.rs.ext.MessageBodyReader<File>, javax.ws.rs.ext.MessageBodyWriter<File>

Version:
$Revision: 1 $
Author:
Mark Little

Constructor Summary
FileProvider()
           
 
Method Summary
 long getSize(File o, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 File readFrom(Class<File> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)
           
 void writeTo(File uploadFile, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileProvider

public FileProvider()
Method Detail

isReadable

public boolean isReadable(Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader<File>

readFrom

public File readFrom(Class<File> 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:
readFrom in interface javax.ws.rs.ext.MessageBodyReader<File>
Throws:
IOException

isWriteable

public boolean isWriteable(Class<?> type,
                           Type genericType,
                           Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<File>

getSize

public long getSize(File o,
                    Class<?> type,
                    Type genericType,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<File>

writeTo

public void writeTo(File uploadFile,
                    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:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<File>
Throws:
IOException

RESTEasy JAX-RS Implementation 2.3.6.Final-redhat-1

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.