Package org.nuxeo.ecm.webengine.model.io
Class BlobWriter
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.io.BlobWriter
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<Blob>
@Provider public class BlobWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<Blob>
- Author:
- Bogdan Stefanescu
-
-
Constructor Summary
Constructors Constructor Description BlobWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
commitAndReopenTransaction()
long
getSize(Blob arg0, Class<?> arg1, Type arg2, Annotation[] arg3, javax.ws.rs.core.MediaType arg4)
boolean
isWriteable(Class<?> arg0, Type type, Annotation[] arg2, javax.ws.rs.core.MediaType arg3)
protected void
transferBlob(Blob blob, OutputStream entityStream)
void
writeTo(Blob blob, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
-
-
Field Detail
-
BLOB_ID
public static final String BLOB_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
writeTo
public void writeTo(Blob blob, 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 interfacejavax.ws.rs.ext.MessageBodyWriter<Blob>
- Throws:
IOException
-
commitAndReopenTransaction
protected void commitAndReopenTransaction()
-
transferBlob
protected void transferBlob(Blob blob, OutputStream entityStream) throws IOException
- Throws:
IOException
-
getSize
public long getSize(Blob arg0, Class<?> arg1, Type arg2, Annotation[] arg3, javax.ws.rs.core.MediaType arg4)
- Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<Blob>
-
isWriteable
public boolean isWriteable(Class<?> arg0, Type type, Annotation[] arg2, javax.ws.rs.core.MediaType arg3)
- Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<Blob>
-
-