@Provider public class RJsonEncoder extends JsonEncoder implements javax.ws.rs.ext.MessageBodyWriter
${services_rest_encoders_RJsonEncoder_Title}
${services_rest_encoders_RJsonEncoder_Description}
Constructor and Description |
---|
RJsonEncoder()
${services_rest_encoders_RJsonEncoder_constructor_RJsonEncoder_Title}
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<MediaType> |
createSupportedMediaTypes()
${services_rest_encoders_RJsonEncoder_method_createSupportedMediaTypes_Title}
|
protected boolean |
isindent()
Whether to generate a string in an indented format.
|
boolean |
isWriteable(java.lang.Class arg0, java.lang.reflect.Type arg1, java.lang.annotation.Annotation[] arg2, javax.ws.rs.core.MediaType arg3)
Determines whether the present expression supports the representation of the specified media type.
|
Representation |
toRepresentation(MediaType mediaType, java.lang.Object resourceObj)
${services_rest_encoders_RJsonEncoder_method_toRepresentation_Title}
|
getSize, toFormatedObject, toFormatedString, writeTo
getSupportedMediaTypes, isEncodeAllow
public RJsonEncoder()
${services_rest_encoders_RJsonEncoder_constructor_RJsonEncoder_Title}
${services_rest_encoders_RJsonEncoder_constructor_RJsonEncoder_Description}
protected java.util.List<MediaType> createSupportedMediaTypes()
${services_rest_encoders_RJsonEncoder_method_createSupportedMediaTypes_Title}
${services_rest_encoders_RJsonEncoder_method_createSupportedMediaTypes_Description}
createSupportedMediaTypes
in class JsonEncoder
public Representation toRepresentation(MediaType mediaType, java.lang.Object resourceObj)
${services_rest_encoders_RJsonEncoder_method_toRepresentation_Title}
${services_rest_encoders_RJsonEncoder_method_toRepresentation_Description}
toRepresentation
in class JsonEncoder
mediaType
- ${services_rest_encoders_RJsonEncoder_method_toRepresentation_param_mediaType}resourceObj
- ${services_rest_encoders_RJsonEncoder_method_toRepresentation_param_resourceObj}protected boolean isindent()
Whether to generate a string in an indented format.
isindent
in class JsonEncoder
public boolean isWriteable(java.lang.Class arg0, java.lang.reflect.Type arg1, java.lang.annotation.Annotation[] arg2, javax.ws.rs.core.MediaType arg3)
JsonEncoder
Determines whether the present expression supports the representation of the specified media type.
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter
isWriteable
in class JsonEncoder
arg0
- The type of object to generate the expression.arg1
- the specified object type.arg2
- annotation array, the resource has these annotation methods to return to the object to be written.arg3
- The media type of the expected response.