|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.api.jaxrs.providers.AbstractProvider
ccc.api.jaxrs.providers.FileReader
@Provider public class FileReader
A MessageBodyReader
for durations.
Constructor Summary | |
---|---|
FileReader()
|
Method Summary | |
---|---|
long |
getSize(File t,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
|
boolean |
isReadable(java.lang.Class<?> clazz,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
|
boolean |
isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
|
File |
readFrom(java.lang.Class<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)
|
protected java.lang.String |
toCharset(java.lang.String contentType)
Extract the charset parameter from the content-type HTTP header. |
protected MimeType |
toMimeType(java.lang.String contentType)
Extract the mime type from the content-type HTTP header. |
void |
writeTo(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 ccc.api.jaxrs.providers.AbstractProvider |
---|
createWriter, getTypeArgument, isCollectionOfType, isMapOfType, readJson, readString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileReader()
Method Detail |
---|
public boolean isReadable(java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<File>
public File readFrom(java.lang.Class<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
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<File>
java.io.IOException
protected MimeType toMimeType(java.lang.String contentType)
If the header value is un-parsable then "application/octet-stream" will be returned.
contentType
- The HTTP content type.
protected java.lang.String toCharset(java.lang.String contentType)
contentType
- The HTTP content type.
public long getSize(File t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<File>
public boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<File>
public void writeTo(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
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<File>
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |