|
Spring for Android | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.http.converter.AbstractHttpMessageConverter<com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed> org.springframework.http.converter.feed.SyndFeedHttpMessageConverter
public class SyndFeedHttpMessageConverter
Implementation of HttpMessageConverter
that can read and write RSS and
ATOM feeds. Specifically, this converter can handle SyndFeed
objects, from the Android ROME Feed Reader, which is a repackaging of
java.net's ROME.
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.
SyndFeed
Field Summary | |
---|---|
static java.nio.charset.Charset |
DEFAULT_CHARSET
|
Constructor Summary | |
---|---|
SyndFeedHttpMessageConverter()
Constructor that sets the supportedMediaTypes to
application/rss+xml and application/atom+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)
Abstract template method that reads the actualy object. |
protected boolean |
supports(java.lang.Class<?> clazz)
Indicates whether the given class is supported by this converter. |
protected void |
writeInternal(com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed syndFeed,
HttpOutputMessage outputMessage)
Abstract template method that writes the actual body. |
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 |
---|
public static final java.nio.charset.Charset DEFAULT_CHARSET
Constructor Detail |
---|
public SyndFeedHttpMessageConverter()
supportedMediaTypes
to
application/rss+xml
and application/atom+xml
.
Method Detail |
---|
protected boolean supports(java.lang.Class<?> clazz)
AbstractHttpMessageConverter
supports
in class AbstractHttpMessageConverter<com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed>
clazz
- the class to test for support
true
if supported; false
otherwiseprotected 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
AbstractHttpMessageConverter
AbstractHttpMessageConverter.read(java.lang.Class extends T>, org.springframework.http.HttpInputMessage)
.
readInternal
in class AbstractHttpMessageConverter<com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed>
clazz
- the type of object to returninputMessage
- the HTTP input message to read from
java.io.IOException
- in case of I/O errors
HttpMessageNotReadableException
- in case of conversion errorsprotected void writeInternal(com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed syndFeed, HttpOutputMessage outputMessage) throws java.io.IOException, HttpMessageNotWritableException
AbstractHttpMessageConverter
AbstractHttpMessageConverter.write(T, org.springframework.http.MediaType, org.springframework.http.HttpOutputMessage)
.
writeInternal
in class AbstractHttpMessageConverter<com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.SyndFeed>
syndFeed
- the object to write to the output messageoutputMessage
- the message to write to
java.io.IOException
- in case of I/O errors
HttpMessageNotWritableException
- in case of conversion errors
|
Spring for Android | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |