org.trialox.jaxrs.providers.provided
Class FileProvider

java.lang.Object
  extended by org.trialox.jaxrs.providers.provided.AbstractMessageReaderWriterProvider<java.io.File>
      extended by org.trialox.jaxrs.providers.provided.FileProvider
All Implemented Interfaces:
java.lang.Comparable, javax.ws.rs.ext.MessageBodyReader<java.io.File>, javax.ws.rs.ext.MessageBodyWriter<java.io.File>

public final class FileProvider
extends AbstractMessageReaderWriterProvider<java.io.File>

Author:
szalay

Field Summary
 
Fields inherited from class org.trialox.jaxrs.providers.provided.AbstractMessageReaderWriterProvider
UTF8
 
Constructor Summary
FileProvider()
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 long getSize(java.io.File t)
           
 boolean isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations)
           
 boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations)
           
 java.io.File readFrom(java.lang.Class<java.io.File> arg0, java.lang.reflect.Type arg1, java.lang.annotation.Annotation[] arg2, javax.ws.rs.core.MediaType arg3, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> arg4, java.io.InputStream arg5)
           
 void writeTo(java.io.File t, 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)
           
 
Methods inherited from class org.trialox.jaxrs.providers.provided.AbstractMessageReaderWriterProvider
getCharset, getCharset, readFromAsString, writeTo, writeTo, writeToAsString
 
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

compareTo

public int compareTo(java.lang.Object o)

readFrom

public java.io.File readFrom(java.lang.Class<java.io.File> arg0,
                             java.lang.reflect.Type arg1,
                             java.lang.annotation.Annotation[] arg2,
                             javax.ws.rs.core.MediaType arg3,
                             javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> arg4,
                             java.io.InputStream arg5)
                      throws java.io.IOException,
                             javax.ws.rs.WebApplicationException
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException

isReadable

public boolean isReadable(java.lang.Class<?> type,
                          java.lang.reflect.Type genericType,
                          java.lang.annotation.Annotation[] annotations)

isWriteable

public boolean isWriteable(java.lang.Class<?> type,
                           java.lang.reflect.Type genericType,
                           java.lang.annotation.Annotation[] annotations)

writeTo

public void writeTo(java.io.File t,
                    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.IOException
Throws:
java.io.IOException

getSize

public long getSize(java.io.File t)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<java.io.File>
Overrides:
getSize in class AbstractMessageReaderWriterProvider<java.io.File>


Copyright © 2008. All Rights Reserved.