org.apache.camel.converter
Class IOConverter

java.lang.Object
  extended by org.apache.camel.converter.IOConverter

@Converter
public final class IOConverter
extends Object

Some core java.io based Type Converters

Version:
$Revision: 795369 $

Method Summary
static byte[] toByteArray(BufferedReader reader)
           
static byte[] toByteArray(ByteArrayOutputStream os)
           
static byte[] toByteArray(File file)
           
static byte[] toByteArray(Reader reader)
           
static byte[] toBytes(InputStream stream)
           
static File toFile(String name)
           
static InputStream toInputStream(BufferedReader buffer, Exchange exchange)
           
static InputStream toInputStream(byte[] data)
           
static InputStream toInputStream(ByteArrayOutputStream os)
           
static InputStream toInputStream(File file)
           
static InputStream toInputStream(String text, Exchange exchange)
           
static InputStream toInputStream(URL url)
           
static InputStream toInputStrean(DOMSource source)
           
static ObjectInput toObjectInput(InputStream stream)
           
static ObjectOutput toObjectOutput(OutputStream stream)
           
static OutputStream toOutputStream(File file)
           
static BufferedReader toReader(File file)
           
static Reader toReader(InputStream in)
           
static StringReader toReader(String text)
           
static String toString(BufferedReader reader)
           
static String toString(byte[] data, Exchange exchange)
           
static String toString(ByteArrayOutputStream os)
           
static String toString(File file)
           
static String toString(InputStream in)
           
static String toString(Reader reader)
           
static String toString(URL url)
           
static BufferedWriter toWriter(File file)
           
static Writer toWriter(OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toInputStream

@Converter
public static InputStream toInputStream(URL url)
                                 throws IOException
Throws:
IOException

toInputStream

@Converter
public static InputStream toInputStream(File file)
                                 throws FileNotFoundException
Throws:
FileNotFoundException

toReader

@Converter
public static BufferedReader toReader(File file)
                               throws FileNotFoundException
Throws:
FileNotFoundException

toFile

@Converter
public static File toFile(String name)
                   throws FileNotFoundException
Throws:
FileNotFoundException

toOutputStream

@Converter
public static OutputStream toOutputStream(File file)
                                   throws FileNotFoundException
Throws:
FileNotFoundException

toWriter

@Converter
public static BufferedWriter toWriter(File file)
                               throws IOException
Throws:
IOException

toReader

@Converter
public static Reader toReader(InputStream in)

toWriter

@Converter
public static Writer toWriter(OutputStream out)

toReader

@Converter
public static StringReader toReader(String text)

toInputStream

@Converter
public static InputStream toInputStream(String text,
                                                  Exchange exchange)

toInputStream

@Converter
public static InputStream toInputStream(BufferedReader buffer,
                                                  Exchange exchange)
                                 throws IOException
Throws:
IOException

toInputStrean

@Converter
public static InputStream toInputStrean(DOMSource source)
                                 throws TransformerException,
                                        IOException
Throws:
TransformerException
IOException

toString

@Converter
public static String toString(byte[] data,
                                        Exchange exchange)

toString

@Converter
public static String toString(File file)
                       throws IOException
Throws:
IOException

toByteArray

@Converter
public static byte[] toByteArray(File file)
                          throws IOException
Throws:
IOException

toByteArray

@Converter
public static byte[] toByteArray(Reader reader)
                          throws IOException
Throws:
IOException

toString

@Converter
public static String toString(URL url)
                       throws IOException
Throws:
IOException

toString

@Converter
public static String toString(Reader reader)
                       throws IOException
Throws:
IOException

toString

@Converter
public static String toString(BufferedReader reader)
                       throws IOException
Throws:
IOException

toByteArray

@Converter
public static byte[] toByteArray(BufferedReader reader)
                          throws IOException
Throws:
IOException

toString

@Converter
public static String toString(InputStream in)
                       throws IOException
Throws:
IOException

toInputStream

@Converter
public static InputStream toInputStream(byte[] data)

toObjectOutput

@Converter
public static ObjectOutput toObjectOutput(OutputStream stream)
                                   throws IOException
Throws:
IOException

toObjectInput

@Converter
public static ObjectInput toObjectInput(InputStream stream)
                                 throws IOException
Throws:
IOException

toBytes

@Converter
public static byte[] toBytes(InputStream stream)
                      throws IOException
Throws:
IOException

toByteArray

@Converter
public static byte[] toByteArray(ByteArrayOutputStream os)

toString

@Converter
public static String toString(ByteArrayOutputStream os)

toInputStream

@Converter
public static InputStream toInputStream(ByteArrayOutputStream os)


Apache CAMEL