public abstract class AbstractHttpMessageConverter<T> extends java.lang.Object implements HttpMessageConverter<T>
| 限定符和类型 | 字段和说明 |
|---|---|
static java.nio.charset.Charset |
DEFAULT_CHARSET |
| 构造器和说明 |
|---|
AbstractHttpMessageConverter(java.nio.charset.Charset defaultCharset,
ContentType... supportedContentTypes) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected java.nio.charset.Charset |
getCharset(ContentType contentType) |
java.util.List<ContentType> |
getSupportContentTypes() |
T |
read(java.lang.Class<? extends T> clazz,
HttpInputMessage inputMessage) |
protected abstract T |
readInternal(java.lang.Class<? extends T> clazz,
HttpInputMessage inputMessage) |
void |
setSupportedContentTypes(java.util.List<ContentType> supportedContentTypes) |
boolean |
supportRead(java.lang.Class<?> clazz,
ContentType contentType) |
protected boolean |
supportRead(ContentType contentType) |
protected abstract boolean |
supports(java.lang.Class<?> clazz) |
boolean |
supportWrite(java.lang.Class<?> clazz,
ContentType contentType) |
protected boolean |
supportWrite(ContentType contentType) |
void |
write(T t,
ContentType contentType,
HttpOutputMessage httpOutputMessage) |
protected void |
writeBody(RequestBody body,
byte[] buffer) |
protected abstract void |
writeInternal(T t,
ContentType contentType,
HttpOutputMessage httpOutputMessage) |
public AbstractHttpMessageConverter(java.nio.charset.Charset defaultCharset,
ContentType... supportedContentTypes)
public void setSupportedContentTypes(java.util.List<ContentType> supportedContentTypes)
public java.util.List<ContentType> getSupportContentTypes()
getSupportContentTypes 在接口中 HttpMessageConverter<T>protected abstract boolean supports(java.lang.Class<?> clazz)
protected boolean supportRead(ContentType contentType)
public boolean supportRead(java.lang.Class<?> clazz,
ContentType contentType)
supportRead 在接口中 HttpMessageConverter<T>public final T read(java.lang.Class<? extends T> clazz, HttpInputMessage inputMessage)
read 在接口中 HttpMessageConverter<T>protected abstract T readInternal(java.lang.Class<? extends T> clazz, HttpInputMessage inputMessage) throws java.io.IOException
java.io.IOExceptionprotected boolean supportWrite(ContentType contentType)
public final boolean supportWrite(java.lang.Class<?> clazz,
ContentType contentType)
supportWrite 在接口中 HttpMessageConverter<T>public final void write(T t, ContentType contentType, HttpOutputMessage httpOutputMessage)
write 在接口中 HttpMessageConverter<T>protected abstract void writeInternal(T t, ContentType contentType, HttpOutputMessage httpOutputMessage) throws java.io.IOException
java.io.IOExceptionprotected void writeBody(RequestBody body, byte[] buffer) throws java.io.IOException
java.io.IOExceptionprotected java.nio.charset.Charset getCharset(ContentType contentType)