Class JsonValueBodyWriter
java.lang.Object
org.glassfish.json.jaxrs.JsonValueBodyWriter
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<JsonValue>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(JsonValue jsonValue, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) private voidinit()booleanisWriteable(Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) private static booleansupportsMediaType(javax.ws.rs.core.MediaType mediaType) voidwriteTo(JsonValue jsonValue, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> stringObjectMultivaluedMap, OutputStream outputStream)
-
Field Details
-
JSON
- See Also:
-
PLUS_JSON
- See Also:
-
wf
-
config
@Context private javax.ws.rs.core.Configuration config
-
-
Constructor Details
-
JsonValueBodyWriter
public JsonValueBodyWriter()
-
-
Method Details
-
init
-
isWriteable
public boolean isWriteable(Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter<JsonValue>
-
supportsMediaType
private static boolean supportsMediaType(javax.ws.rs.core.MediaType mediaType) - Returns:
- true for all media types of the pattern */json and */*+json.
-
getSize
public long getSize(JsonValue jsonValue, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejavax.ws.rs.ext.MessageBodyWriter<JsonValue>
-
writeTo
public void writeTo(JsonValue jsonValue, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> stringObjectMultivaluedMap, OutputStream outputStream) throws IOException, javax.ws.rs.WebApplicationException- Specified by:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<JsonValue>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-