org.nuxeo.ecm.webengine.model.io
Class FileWriter
java.lang.Object
org.nuxeo.ecm.webengine.model.io.FileWriter
- All Implemented Interfaces:
- MessageBodyWriter<File>
@Provider
public class FileWriter
- extends Object
- implements MessageBodyWriter<File>
text/plain is needed otherwise resteasy will use its default text plain
(@see DefaultTextPlain) writer to write text/plain objects and the file is
not written correctly.
- Author:
- Bogdan Stefanescu
Method Summary |
long |
getSize(File arg0,
Class<?> arg1,
Type arg2,
Annotation[] arg3,
MediaType arg4)
|
boolean |
isWriteable(Class<?> arg0,
Type type,
Annotation[] arg2,
MediaType arg3)
|
void |
writeTo(File t,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
|
FileWriter
public FileWriter()
writeTo
public void writeTo(File t,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
throws IOException
- Specified by:
writeTo
in interface MessageBodyWriter<File>
- Throws:
IOException
getSize
public long getSize(File arg0,
Class<?> arg1,
Type arg2,
Annotation[] arg3,
MediaType arg4)
- Specified by:
getSize
in interface MessageBodyWriter<File>
isWriteable
public boolean isWriteable(Class<?> arg0,
Type type,
Annotation[] arg2,
MediaType arg3)
- Specified by:
isWriteable
in interface MessageBodyWriter<File>
Copyright © 2011 Nuxeo SAS. All Rights Reserved.