T
- public abstract class AbstractWriter<T> extends GenericAware<T> implements javax.ws.rs.ext.MessageBodyWriter<T>
Modifier and Type | Field and Description |
---|---|
protected Supplier<String> |
nullValueSupplier
Supply a default Null value
|
ct, t
Constructor and Description |
---|
AbstractWriter() |
Modifier and Type | Method and Description |
---|---|
protected net.sf.json.JsonConfig |
getConfig()
Override for custom configs
|
Supplier<String> |
getNullValueSupplier()
Supply a default Null value
|
long |
getSize(T t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
void |
setNullValueSupplier(Supplier<String> nullValueSupplier)
Supply a default Null value
|
void |
writeTo(T t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
protected net.sf.json.JsonConfig getConfig()
public long getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<T>
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<T>
public void writeTo(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<T>
IOException
javax.ws.rs.WebApplicationException
public Supplier<String> getNullValueSupplier()
Copyright © 2018. All rights reserved.