Top Description Fields Constructors Methods
org.springframework.http.converter.feed

public abstract Class AbstractWireFeedHttpMessageConverter<T extends WireFeed>

extends AbstractHttpMessageConverter<T extends WireFeed>
Class Inheritance
Known Direct Subclasses
org.springframework.http.converter.feed.AtomFeedHttpMessageConverter, org.springframework.http.converter.feed.RssChannelHttpMessageConverter
Type Parameters
<T>
the converted object type
Imports
java.io.IOException, .InputStream, .InputStreamReader, .OutputStreamWriter, .Reader, .Writer, java.nio.charset.Charset, .StandardCharsets, com.rometools.rome.feed.WireFeed, com.rometools.rome.io.FeedException, .WireFeedInput, .WireFeedOutput, org.springframework.http.HttpInputMessage, .HttpOutputMessage, .MediaType, org.springframework.http.converter.AbstractHttpMessageConverter, .HttpMessageNotReadableException, .HttpMessageNotWritableException, org.springframework.util.StreamUtils, .StringUtils

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.

Author
Arjen Poutsma
Since
3.0.2
See Also
AtomFeedHttpMessageConverter, RssChannelHttpMessageConverter

Field Summary

Modifier and TypeField and Description
public static final Charset
DEFAULT_CHARSET

The default charset used by the converter.

Inherited from org.springframework.http.converter.AbstractHttpMessageConverter:
logger

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected T
readInternal(Class<? extends T>
the type of object to return
clazz
,
HttpInputMessage
the HTTP input message to read from
inputMessage
)

Implements abstract org.springframework.http.converter.AbstractHttpMessageConverter.readInternal.

Abstract template method that reads the actual object.

protected boolean
supportsRepeatableWrites(T
the object t
t
)

Overrides org.springframework.http.converter.AbstractHttpMessageConverter.supportsRepeatableWrites.

Indicates whether this message converter can write the given object multiple times.

protected void
writeInternal(T
the object to write to the output message
wireFeed
,
HttpOutputMessage
the HTTP output message to write to
outputMessage
)

Implements abstract org.springframework.http.converter.AbstractHttpMessageConverter.writeInternal.

Abstract template method that writes the actual body.

Inherited from org.springframework.http.converter.AbstractHttpMessageConverter:
addDefaultHeaderscanReadcanReadcanWritecanWritegetContentLengthgetDefaultCharsetgetDefaultContentTypegetSupportedMediaTypesreadsetDefaultCharsetsetSupportedMediaTypessupportswrite

Field Detail

DEFAULT_CHARSETback to summary
public static final Charset DEFAULT_CHARSET

The default charset used by the converter.

Constructor Detail

AbstractWireFeedHttpMessageConverterback to summary
protected AbstractWireFeedHttpMessageConverter(MediaType supportedMediaType)

Method Detail

readInternalback to summary
protected T readInternal(Class<? extends T> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException

Implements abstract org.springframework.http.converter.AbstractHttpMessageConverter.readInternal.

Doc from org.springframework.http.converter.AbstractHttpMessageConverter.readInternal.

Abstract template method that reads the actual object. Invoked from read.

Parameters
clazz:Class<? extends T>

the type of object to return

inputMessage:HttpInputMessage

the HTTP input message to read from

Returns:T

the converted object

Annotations
@Override
@SuppressWarnings:unchecked
Exceptions
IOException:
in case of I/O errors
HttpMessageNotReadableException:
in case of conversion errors
supportsRepeatableWritesback to summary
protected boolean supportsRepeatableWrites(T t)

Overrides org.springframework.http.converter.AbstractHttpMessageConverter.supportsRepeatableWrites.

Doc from org.springframework.http.converter.AbstractHttpMessageConverter.supportsRepeatableWrites.

Indicates whether this message converter can write the given object multiple times.

Default implementation returns false.

Parameters
t:T

the object t

Returns:boolean

true if t can be written repeatedly; false otherwise

Annotations
@Override
writeInternalback to summary
protected void writeInternal(T wireFeed, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException

Implements abstract org.springframework.http.converter.AbstractHttpMessageConverter.writeInternal.

Doc from org.springframework.http.converter.AbstractHttpMessageConverter.writeInternal.

Abstract template method that writes the actual body. Invoked from write.

Parameters
wireFeed:T

the object to write to the output message

outputMessage:HttpOutputMessage

the HTTP output message to write to

Annotations
@Override
Exceptions
IOException:
in case of I/O errors
HttpMessageNotWritableException:
in case of conversion errors