Package org.apache.camel.converter
Class IOConverter
- java.lang.Object
-
- org.apache.camel.converter.IOConverter
-
@Converter(generateBulkLoader=true) public final class IOConverter extends Object
Some core java.io based Type Converters
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ByteBuffercovertToByteBuffer(InputStream is)static byte[]toByteArray(BufferedReader reader, org.apache.camel.Exchange exchange)static byte[]toByteArray(ByteArrayOutputStream os)static byte[]toByteArray(File file)static byte[]toByteArray(Reader reader, org.apache.camel.Exchange exchange)static byte[]toByteArray(String value, org.apache.camel.Exchange exchange)static byte[]toBytes(InputStream stream)static FiletoFile(String name)static InputStreamtoInputStream(byte[] data)static InputStreamtoInputStream(BufferedReader buffer, org.apache.camel.Exchange exchange)static InputStreamtoInputStream(ByteArrayOutputStream os)static InputStreamtoInputStream(File file)static InputStreamtoInputStream(StringBuffer buffer, org.apache.camel.Exchange exchange)static InputStreamtoInputStream(StringBuilder builder, org.apache.camel.Exchange exchange)static InputStreamtoInputStream(String text, org.apache.camel.Exchange exchange)static InputStreamtoInputStream(URL url)static InputStreamtoInputStream(Stream stream, org.apache.camel.Exchange exchange)static ObjectInputtoObjectInput(InputStream stream, org.apache.camel.Exchange exchange)static ObjectOutputtoObjectOutput(OutputStream stream)static OutputStreamtoOutputStream(File file)static PropertiestoProperties(File file)static PropertiestoProperties(InputStream is)static PropertiestoProperties(Reader reader)static ReadertoReader(byte[] data, org.apache.camel.Exchange exchange)static BufferedReadertoReader(File file, org.apache.camel.Exchange exchange)static ReadertoReader(InputStream in, org.apache.camel.Exchange exchange)static ReadertoReader(String text)static StringtoString(byte[] data, org.apache.camel.Exchange exchange)static StringtoString(BufferedReader reader)static StringtoString(ByteArrayOutputStream os, org.apache.camel.Exchange exchange)static StringtoString(File file, org.apache.camel.Exchange exchange)static StringtoString(InputStream in, org.apache.camel.Exchange exchange)static StringtoString(Reader reader)static StringtoString(URL url, org.apache.camel.Exchange exchange)static BufferedWritertoWriter(File file, org.apache.camel.Exchange exchange)static WritertoWriter(OutputStream out, org.apache.camel.Exchange exchange)
-
-
-
Method Detail
-
toInputStream
@Converter(order=1) public static InputStream toInputStream(Stream stream, org.apache.camel.Exchange exchange)
-
toInputStream
@Converter(order=2) public static InputStream toInputStream(URL url) throws IOException
- Throws:
IOException
-
toInputStream
@Converter(order=3) public static InputStream toInputStream(File file) throws IOException
- Throws:
IOException
-
toReader
@Converter(order=4) public static BufferedReader toReader(File file, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toOutputStream
@Converter(order=6) public static OutputStream toOutputStream(File file) throws FileNotFoundException
- Throws:
FileNotFoundException
-
toWriter
@Converter(order=7) public static BufferedWriter toWriter(File file, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toReader
@Converter(order=8) public static Reader toReader(InputStream in, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toReader
@Converter(order=9) public static Reader toReader(byte[] data, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toWriter
@Converter(order=10) public static Writer toWriter(OutputStream out, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toInputStream
@Converter(order=12) public static InputStream toInputStream(String text, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toInputStream
@Converter(order=13) public static InputStream toInputStream(StringBuffer buffer, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toInputStream
@Converter(order=14) public static InputStream toInputStream(StringBuilder builder, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toInputStream
@Converter(order=15) public static InputStream toInputStream(BufferedReader buffer, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toString
@Converter(order=16) public static String toString(byte[] data, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toString
@Converter(order=17) public static String toString(File file, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toByteArray
@Converter(order=18) public static byte[] toByteArray(File file) throws IOException
- Throws:
IOException
-
toByteArray
@Converter(order=19) public static byte[] toByteArray(BufferedReader reader, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toString
@Converter(order=20) public static String toString(URL url, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toString
@Converter(order=21) public static String toString(BufferedReader reader) throws IOException
- Throws:
IOException
-
toString
@Converter(order=22) public static String toString(Reader reader) throws IOException
- Throws:
IOException
-
toByteArray
@Converter(order=23) public static byte[] toByteArray(Reader reader, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toByteArray
@Converter(order=24) public static byte[] toByteArray(String value, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toString
@Converter(order=25) public static String toString(InputStream in, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toInputStream
@Converter(order=26) public static InputStream toInputStream(byte[] data)
-
toObjectOutput
@Converter(order=27) public static ObjectOutput toObjectOutput(OutputStream stream) throws IOException
- Throws:
IOException
-
toObjectInput
@Converter(order=28) public static ObjectInput toObjectInput(InputStream stream, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toBytes
@Converter(order=29) public static byte[] toBytes(InputStream stream) throws IOException
- Throws:
IOException
-
toByteArray
@Converter(order=30) public static byte[] toByteArray(ByteArrayOutputStream os)
-
covertToByteBuffer
@Converter(order=31) public static ByteBuffer covertToByteBuffer(InputStream is) throws IOException
- Throws:
IOException
-
toString
@Converter(order=32) public static String toString(ByteArrayOutputStream os, org.apache.camel.Exchange exchange) throws IOException
- Throws:
IOException
-
toInputStream
@Converter(order=33) public static InputStream toInputStream(ByteArrayOutputStream os)
-
toProperties
@Converter(order=34) public static Properties toProperties(File file) throws IOException
- Throws:
IOException
-
toProperties
@Converter(order=35) public static Properties toProperties(InputStream is) throws IOException
- Throws:
IOException
-
toProperties
@Converter(order=36) public static Properties toProperties(Reader reader) throws IOException
- Throws:
IOException
-
-