Class AbstractWireFeedHttpMessageConverter<T extends com.rometools.rome.feed.WireFeed>
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<T>
org.springframework.http.converter.feed.AbstractWireFeedHttpMessageConverter<T>
- Type Parameters:
T
- the converted object type
- All Implemented Interfaces:
HttpMessageConverter<T>
- Direct Known Subclasses:
AtomFeedHttpMessageConverter
,RssChannelHttpMessageConverter
public abstract class AbstractWireFeedHttpMessageConverter<T extends com.rometools.rome.feed.WireFeed>
extends AbstractHttpMessageConverter<T>
Abstract base class for Atom and RSS Feed message converters, using the
ROME tools project.
NOTE: As of Spring 4.1, this is based on the com.rometools
variant of ROME, version 1.5. Please upgrade your build dependency.
- Since:
- 3.0.2
- Author:
- Arjen Poutsma
- See Also:
-
Field Summary
Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
logger
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractWireFeedHttpMessageConverter
(MediaType supportedMediaType) -
Method Summary
Modifier and TypeMethodDescriptionprotected T
readInternal
(Class<? extends T> clazz, HttpInputMessage inputMessage) Abstract template method that reads the actual object.protected boolean
Indicates whether this message converter can write the given object multiple times.protected void
writeInternal
(T wireFeed, HttpOutputMessage outputMessage) Abstract template method that writes the actual body.Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, supports, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.http.converter.HttpMessageConverter
getSupportedMediaTypes
-
Field Details
-
DEFAULT_CHARSET
The default charset used by the converter.
-
-
Constructor Details
-
AbstractWireFeedHttpMessageConverter
-
-
Method Details
-
readInternal
protected T readInternal(Class<? extends T> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException Description copied from class:AbstractHttpMessageConverter
Abstract template method that reads the actual object. Invoked fromAbstractHttpMessageConverter.read(java.lang.Class<? extends T>, org.springframework.http.HttpInputMessage)
.- Specified by:
readInternal
in classAbstractHttpMessageConverter<T extends com.rometools.rome.feed.WireFeed>
- Parameters:
clazz
- the type of object to returninputMessage
- the HTTP input message to read from- Returns:
- the converted object
- Throws:
IOException
- in case of I/O errorsHttpMessageNotReadableException
- in case of conversion errors
-
writeInternal
protected void writeInternal(T wireFeed, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException Description copied from class:AbstractHttpMessageConverter
Abstract template method that writes the actual body. Invoked fromAbstractHttpMessageConverter.write(T, org.springframework.http.MediaType, org.springframework.http.HttpOutputMessage)
.- Specified by:
writeInternal
in classAbstractHttpMessageConverter<T extends com.rometools.rome.feed.WireFeed>
- Parameters:
wireFeed
- the object to write to the output messageoutputMessage
- the HTTP output message to write to- Throws:
IOException
- in case of I/O errorsHttpMessageNotWritableException
- in case of conversion errors
-
supportsRepeatableWrites
Description copied from class:AbstractHttpMessageConverter
Indicates whether this message converter can write the given object multiple times.The default implementation returns
false
.- Overrides:
supportsRepeatableWrites
in classAbstractHttpMessageConverter<T extends com.rometools.rome.feed.WireFeed>
- Parameters:
t
- the object t- Returns:
true
ift
can be written repeatedly;false
otherwise
-