程序包 org.springframework.http.converter
Provides an HttpMessageConverter abstraction to convert between Java objects and HTTP input/output messages.
接口概要 接口 说明 GenericHttpMessageConverter<T> A specialization ofHttpMessageConverterthat can convert an HTTP request into a target object of a specified generic type and a source object of a specified generic type into an HTTP response.HttpMessageConverter<T> Strategy interface for converting from and to HTTP requests and responses.类概要 类 说明 AbstractGenericHttpMessageConverter<T> Abstract base class for mostGenericHttpMessageConverterimplementations.AbstractHttpMessageConverter<T> Abstract base class for mostHttpMessageConverterimplementations.BufferedImageHttpMessageConverter Implementation ofHttpMessageConverterthat can read and writeBufferedImages.ByteArrayHttpMessageConverter Implementation ofHttpMessageConverterthat can read and write byte arrays.FormHttpMessageConverter Implementation ofHttpMessageConverterto read and write 'normal' HTML forms and also to write (but not read) multipart data (e.g. file uploads).ObjectToStringHttpMessageConverter AnHttpMessageConverterthat usesStringHttpMessageConverterfor reading and writing content and aConversionServicefor converting the String content to and from the target object type.ResourceHttpMessageConverter Implementation ofHttpMessageConverterthat can read/writeResourcesand supports byte range requests.ResourceRegionHttpMessageConverter Implementation ofHttpMessageConverterthat can write a singleResourceRegion, or Collections ofResourceRegions.StringHttpMessageConverter Implementation ofHttpMessageConverterthat can read and write strings.异常错误概要 异常错误 说明 HttpMessageConversionException Thrown byHttpMessageConverterimplementations when a conversion attempt fails.HttpMessageNotReadableException Thrown byHttpMessageConverterimplementations when theHttpMessageConverter.read(java.lang.Class<? extends T>, org.springframework.http.HttpInputMessage)method fails.HttpMessageNotWritableException Thrown byHttpMessageConverterimplementations when theHttpMessageConverter.write(T, org.springframework.http.MediaType, org.springframework.http.HttpOutputMessage)method fails.