public class GsonHttpMessageConverter extends org.springframework.http.converter.AbstractHttpMessageConverter<RestResponse<?>>
| Modifier and Type | Field and Description |
|---|---|
static com.google.gson.GsonBuilder |
GSON_BUILDER |
| Constructor and Description |
|---|
GsonHttpMessageConverter(boolean statsEnabled) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Class<?> clazz,
org.springframework.http.MediaType mediaType) |
boolean |
canWrite(Class<?> clazz,
org.springframework.http.MediaType mediaType) |
List<org.springframework.http.MediaType> |
getSupportedMediaTypes() |
protected RestResponse<?> |
readInternal(Class<? extends RestResponse<?>> clazz,
org.springframework.http.HttpInputMessage inputMessage) |
protected boolean |
supports(Class<?> clazz) |
protected void |
writeInternal(RestResponse<?> objectRestResponse,
org.springframework.http.HttpOutputMessage outputMessage) |
public boolean canRead(Class<?> clazz, org.springframework.http.MediaType mediaType)
canRead in interface org.springframework.http.converter.HttpMessageConverter<RestResponse<?>>canRead in class org.springframework.http.converter.AbstractHttpMessageConverter<RestResponse<?>>public boolean canWrite(Class<?> clazz, org.springframework.http.MediaType mediaType)
canWrite in interface org.springframework.http.converter.HttpMessageConverter<RestResponse<?>>canWrite in class org.springframework.http.converter.AbstractHttpMessageConverter<RestResponse<?>>public List<org.springframework.http.MediaType> getSupportedMediaTypes()
getSupportedMediaTypes in interface org.springframework.http.converter.HttpMessageConverter<RestResponse<?>>getSupportedMediaTypes in class org.springframework.http.converter.AbstractHttpMessageConverter<RestResponse<?>>protected boolean supports(Class<?> clazz)
supports in class org.springframework.http.converter.AbstractHttpMessageConverter<RestResponse<?>>protected RestResponse<?> readInternal(Class<? extends RestResponse<?>> clazz, org.springframework.http.HttpInputMessage inputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotReadableException
readInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<RestResponse<?>>IOExceptionorg.springframework.http.converter.HttpMessageNotReadableExceptionprotected void writeInternal(RestResponse<?> objectRestResponse, org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException
writeInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<RestResponse<?>>IOExceptionorg.springframework.http.converter.HttpMessageNotWritableExceptionCopyright © 2012–2021 Pivotal Software, Inc.. All rights reserved.