public abstract class AbstractHttpMessageConverter<T> extends Object implements org.springframework.http.converter.HttpMessageConverter<T>
| Constructor and Description |
|---|
AbstractHttpMessageConverter(Class<T> supportedClass,
Collection<?> readMediaTypes,
Collection<?> writeMediaTypes) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Class<?> clazz,
org.springframework.http.MediaType mediaType) |
boolean |
canWrite(Class<?> clazz,
org.springframework.http.MediaType mediaType) |
org.springframework.http.MediaType |
getDefaultMediaType() |
static List<org.springframework.http.MediaType> |
getMediaTypes(Collection<?> contentTypes) |
List<org.springframework.http.MediaType> |
getSupportedMediaTypes() |
protected boolean |
isReadSupported(org.springframework.http.MediaType mediaType) |
protected boolean |
isWriteSupported(org.springframework.http.MediaType mediaType) |
T |
read(Class<? extends T> clazz,
org.springframework.http.HttpInputMessage inputMessage) |
void |
setDefaultMediaType(org.springframework.http.MediaType defaultMediaType) |
protected boolean |
supports(Class<?> clazz) |
void |
write(T object,
org.springframework.http.MediaType contentType,
org.springframework.http.HttpOutputMessage outputMessage) |
public AbstractHttpMessageConverter(Class<T> supportedClass, Collection<?> readMediaTypes, Collection<?> writeMediaTypes)
public static List<org.springframework.http.MediaType> getMediaTypes(Collection<?> contentTypes)
public boolean canRead(Class<?> clazz, org.springframework.http.MediaType mediaType)
canRead in interface org.springframework.http.converter.HttpMessageConverter<T>public boolean canWrite(Class<?> clazz, org.springframework.http.MediaType mediaType)
canWrite in interface org.springframework.http.converter.HttpMessageConverter<T>public org.springframework.http.MediaType getDefaultMediaType()
public List<org.springframework.http.MediaType> getSupportedMediaTypes()
getSupportedMediaTypes in interface org.springframework.http.converter.HttpMessageConverter<T>protected boolean isReadSupported(org.springframework.http.MediaType mediaType)
protected boolean isWriteSupported(org.springframework.http.MediaType mediaType)
public T read(Class<? extends T> clazz, org.springframework.http.HttpInputMessage inputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotReadableException
read in interface org.springframework.http.converter.HttpMessageConverter<T>IOExceptionorg.springframework.http.converter.HttpMessageNotReadableExceptionpublic void setDefaultMediaType(org.springframework.http.MediaType defaultMediaType)
protected boolean supports(Class<?> clazz)
public void write(T object, org.springframework.http.MediaType contentType, org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException
write in interface org.springframework.http.converter.HttpMessageConverter<T>IOExceptionorg.springframework.http.converter.HttpMessageNotWritableExceptionCopyright © 2015 Revolution Systems Inc.. All rights reserved.