org.springframework.http.converter.feed
Class SyndFeedHttpMessageConverter

java.lang.Object
  extended by org.springframework.http.converter.AbstractHttpMessageConverter<com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed>
      extended by org.springframework.http.converter.feed.SyndFeedHttpMessageConverter
All Implemented Interfaces:
HttpMessageConverter<com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed>

public class SyndFeedHttpMessageConverter
extends AbstractHttpMessageConverter<com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed>

Implementation of HttpMessageConverter that can read and write RSS and ATOM feeds. Specifically, this converter can handle SyndFeed objects, from the ROME project.

By default, this converter reads and writes the media types (application/rss+xml and application/atom+xml). This can be overridden by setting the supportedMediaTypes property.

Since:
1.0.0
See Also:
SyndFeed

Field Summary
static java.nio.charset.Charset DEFAULT_CHARSET
           
 
Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
logger
 
Constructor Summary
SyndFeedHttpMessageConverter()
          Protected constructor that sets the supportedMediaTypes to text/xml and application/xml, and application/*-xml.
 
Method Summary
protected  com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed readInternal(java.lang.Class<? extends com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed> clazz, HttpInputMessage inputMessage)
           
protected  boolean supports(java.lang.Class<?> clazz)
           
protected  void writeInternal(com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed syndFeed, HttpOutputMessage outputMessage)
           
 
Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
canRead, canRead, canWrite, canWrite, getContentLength, getDefaultContentType, getSupportedMediaTypes, read, setSupportedMediaTypes, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CHARSET

public static final java.nio.charset.Charset DEFAULT_CHARSET
Constructor Detail

SyndFeedHttpMessageConverter

public SyndFeedHttpMessageConverter()
Protected constructor that sets the supportedMediaTypes to text/xml and application/xml, and application/*-xml.

Method Detail

supports

protected boolean supports(java.lang.Class<?> clazz)
Specified by:
supports in class AbstractHttpMessageConverter<com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed>

readInternal

protected com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed readInternal(java.lang.Class<? extends com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed> clazz,
                                                                                                      HttpInputMessage inputMessage)
                                                                                               throws java.io.IOException,
                                                                                                      HttpMessageNotReadableException
Specified by:
readInternal in class AbstractHttpMessageConverter<com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed>
Throws:
java.io.IOException
HttpMessageNotReadableException

writeInternal

protected void writeInternal(com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed syndFeed,
                             HttpOutputMessage outputMessage)
                      throws java.io.IOException,
                             HttpMessageNotWritableException
Specified by:
writeInternal in class AbstractHttpMessageConverter<com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed>
Throws:
java.io.IOException
HttpMessageNotWritableException