org.apache.camel.converter.stream
Class StreamCacheConverter

java.lang.Object
  extended by org.apache.camel.converter.stream.StreamCacheConverter

@Converter
public final class StreamCacheConverter
extends Object

A set of Converter methods for wrapping stream-based messages in a StreamCache implementation to ensure message re-readability (eg multicasting, retrying)


Method Summary
static byte[] convertToByteArray(StreamCache cache, Exchange exchange)
           
static Serializable convertToSerializable(StreamCache cache, Exchange exchange)
           
static StreamCache convertToStreamCache(BytesSource source)
           
static StreamCache convertToStreamCache(InputStream stream, Exchange exchange)
           
static StreamCache convertToStreamCache(Reader reader, Exchange exchange)
           
static StreamCache convertToStreamCache(SAXSource source, Exchange exchange)
           
static StreamCache convertToStreamCache(StreamSource source, Exchange exchange)
           
static StreamCache convertToStreamCache(StringSource source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertToStreamCache

@Converter
public static StreamCache convertToStreamCache(StreamSource source,
                                                         Exchange exchange)
                                        throws IOException
Throws:
IOException

convertToStreamCache

@Converter
public static StreamCache convertToStreamCache(StringSource source)

convertToStreamCache

@Converter
public static StreamCache convertToStreamCache(BytesSource source)

convertToStreamCache

@Converter
public static StreamCache convertToStreamCache(SAXSource source,
                                                         Exchange exchange)
                                        throws TransformerException
Throws:
TransformerException

convertToStreamCache

@Converter
public static StreamCache convertToStreamCache(InputStream stream,
                                                         Exchange exchange)
                                        throws IOException
Throws:
IOException

convertToStreamCache

@Converter
public static StreamCache convertToStreamCache(Reader reader,
                                                         Exchange exchange)
                                        throws IOException
Throws:
IOException

convertToSerializable

@Converter
public static Serializable convertToSerializable(StreamCache cache,
                                                           Exchange exchange)
                                          throws IOException
Throws:
IOException

convertToByteArray

@Converter
public static byte[] convertToByteArray(StreamCache cache,
                                                  Exchange exchange)
                                 throws IOException
Throws:
IOException


Apache CAMEL