public class SizeOverrideWriter<T>
extends java.lang.Object
implements javax.ws.rs.ext.MessageBodyWriter<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
SizeOverrideWriter.ByteArray |
static class |
SizeOverrideWriter.File |
static class |
SizeOverrideWriter.InputStream |
static class |
SizeOverrideWriter.SizedInputStream |
| Constructor and Description |
|---|
SizeOverrideWriter(javax.ws.rs.ext.MessageBodyWriter<T> delegate) |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Long |
getEntitySize() |
long |
getSize(T t,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
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) |
static void |
setEntitySize(java.lang.Long size) |
void |
writeTo(T 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) |
public SizeOverrideWriter(javax.ws.rs.ext.MessageBodyWriter<T> delegate)
public static java.lang.Long getEntitySize()
public static void setEntitySize(java.lang.Long size)
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<T>public long getSize(T 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<T>public void writeTo(T 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, javax.ws.rs.WebApplicationException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<T>java.io.IOExceptionjavax.ws.rs.WebApplicationException