@Provider
@Produces(value={"application/json","text/json","*/*"})
public class JsonStructureBodyWriter
extends java.lang.Object
implements javax.ws.rs.ext.MessageBodyWriter<JsonStructure>
| Modifier and Type | Field and Description |
|---|---|
private javax.ws.rs.core.Configuration |
config |
private static java.lang.String |
JSON |
private static java.lang.String |
PLUS_JSON |
private JsonWriterFactory |
wf |
| Constructor and Description |
|---|
JsonStructureBodyWriter() |
| Modifier and Type | Method and Description |
|---|---|
long |
getSize(JsonStructure jsonStructure,
java.lang.Class<?> aClass,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
private void |
init() |
boolean |
isWriteable(java.lang.Class<?> aClass,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
private static boolean |
supportsMediaType(javax.ws.rs.core.MediaType mediaType) |
void |
writeTo(JsonStructure jsonStructure,
java.lang.Class<?> aClass,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> stringObjectMultivaluedMap,
java.io.OutputStream outputStream) |
private static final java.lang.String JSON
private static final java.lang.String PLUS_JSON
private JsonWriterFactory wf
@Context private javax.ws.rs.core.Configuration config
@PostConstruct private void init()
public boolean isWriteable(java.lang.Class<?> aClass,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<JsonStructure>private static boolean supportsMediaType(javax.ws.rs.core.MediaType mediaType)
public long getSize(JsonStructure jsonStructure, java.lang.Class<?> aClass, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize in interface javax.ws.rs.ext.MessageBodyWriter<JsonStructure>public void writeTo(JsonStructure jsonStructure, java.lang.Class<?> aClass, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> stringObjectMultivaluedMap, java.io.OutputStream outputStream) throws java.io.IOException, javax.ws.rs.WebApplicationException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<JsonStructure>java.io.IOExceptionjavax.ws.rs.WebApplicationException