Spring for Android

org.springframework.http.converter.feed
Class AbstractWireFeedHttpMessageConverter<T extends com.google.code.rome.android.repackaged.com.sun.syndication.feed.WireFeed>

java.lang.Object
  extended by org.springframework.http.converter.AbstractHttpMessageConverter<T>
      extended by org.springframework.http.converter.feed.AbstractWireFeedHttpMessageConverter<T>
All Implemented Interfaces:
HttpMessageConverter<T>
Direct Known Subclasses:
AtomFeedHttpMessageConverter, RssChannelHttpMessageConverter

public abstract class AbstractWireFeedHttpMessageConverter<T extends com.google.code.rome.android.repackaged.com.sun.syndication.feed.WireFeed>
extends AbstractHttpMessageConverter<T>

Abstract base class for Atom and RSS Feed message converters that uses Android ROME Feed Reader, which is a repackaging of java.net's ROME.

Since:
1.0
Author:
Arjen Poutsma, Roy Clarkson
See Also:
SyndFeedHttpMessageConverter, AtomFeedHttpMessageConverter, RssChannelHttpMessageConverter

Field Summary
static java.nio.charset.Charset DEFAULT_CHARSET
           
 
Constructor Summary
protected AbstractWireFeedHttpMessageConverter(MediaType supportedMediaType)
           
 
Method Summary
protected  T readInternal(java.lang.Class<? extends T> clazz, HttpInputMessage inputMessage)
          Abstract template method that reads the actualy object.
protected  void writeInternal(T wireFeed, 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, supports, 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

AbstractWireFeedHttpMessageConverter

protected AbstractWireFeedHttpMessageConverter(MediaType supportedMediaType)
Method Detail

readInternal

protected T readInternal(java.lang.Class<? extends T> clazz,
                         HttpInputMessage inputMessage)
                                                                                                    throws java.io.IOException,
                                                                                                           HttpMessageNotReadableException
Description copied from class: AbstractHttpMessageConverter
Abstract template method that reads the actualy object. Invoked from AbstractHttpMessageConverter.read(java.lang.Class, org.springframework.http.HttpInputMessage).

Specified by:
readInternal in class AbstractHttpMessageConverter<T extends com.google.code.rome.android.repackaged.com.sun.syndication.feed.WireFeed>
Parameters:
clazz - the type of object to return
inputMessage - the HTTP input message to read from
Returns:
the converted object
Throws:
java.io.IOException - in case of I/O errors
HttpMessageNotReadableException - in case of conversion errors

writeInternal

protected void writeInternal(T wireFeed,
                             HttpOutputMessage outputMessage)
                      throws java.io.IOException,
                             HttpMessageNotWritableException
Description copied from class: AbstractHttpMessageConverter
Abstract template method that writes the actual body. Invoked from AbstractHttpMessageConverter.write(T, org.springframework.http.MediaType, org.springframework.http.HttpOutputMessage).

Specified by:
writeInternal in class AbstractHttpMessageConverter<T extends com.google.code.rome.android.repackaged.com.sun.syndication.feed.WireFeed>
Parameters:
wireFeed - the object to write to the output message
outputMessage - the message to write to
Throws:
java.io.IOException - in case of I/O errors
HttpMessageNotWritableException - in case of conversion errors

Spring for Android