Package org.apache.camel.converter
Class IOConverter
java.lang.Object
org.apache.camel.converter.IOConverter
Some core java.io based Type Converters
-
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBufferstatic byte[]toByteArray(BufferedReader reader, org.apache.camel.Exchange exchange) static byte[]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[]toByteArray(Path file) static byte[]toBytes(InputStream stream) static Charsetstatic Filestatic InputStreamtoInputStream(byte[] data) static InputStreamtoInputStream(BufferedReader buffer, org.apache.camel.Exchange exchange) static InputStreamstatic InputStreamtoInputStream(File file) static InputStreamtoInputStream(Reader buffer, org.apache.camel.Exchange exchange) 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(Path file) 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 OutputStreamtoOutputStream(Path file) static Pathstatic PropertiestoProperties(File file) static Propertiesstatic PropertiestoProperties(Reader reader) static ReadertoReader(byte[] data, org.apache.camel.Exchange exchange) static BufferedReaderstatic ReadertoReader(InputStream in, org.apache.camel.Exchange exchange) static Readerstatic BufferedReaderstatic StringtoString(byte[] data, org.apache.camel.Exchange exchange) static StringtoString(BufferedReader reader) static StringtoString(ByteArrayOutputStream os, org.apache.camel.Exchange exchange) static Stringstatic StringtoString(InputStream in, org.apache.camel.Exchange exchange) static Stringstatic Stringstatic Stringstatic BufferedWriterstatic WritertoWriter(OutputStream out, org.apache.camel.Exchange exchange) static BufferedWriter
-
Method Details
-
toInputStream
@Converter(order=1) public static InputStream toInputStream(Stream<?> stream, org.apache.camel.Exchange exchange) -
toInputStream
- Throws:
IOException
-
toInputStream
- Throws:
IOException
-
toInputStream
- Throws:
IOException
-
toReader
@Converter(order=5) public static BufferedReader toReader(File file, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toReader
@Converter(order=6) public static BufferedReader toReader(Path path, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toOutputStream
@Converter(order=7) public static OutputStream toOutputStream(File file) throws FileNotFoundException - Throws:
FileNotFoundException
-
toOutputStream
- Throws:
IOException
-
toWriter
@Converter(order=9) public static BufferedWriter toWriter(File file, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toWriter
@Converter(order=10) public static BufferedWriter toWriter(Path file, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toReader
@Converter(order=11) public static Reader toReader(InputStream in, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toReader
@Converter(order=12) public static Reader toReader(byte[] data, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toWriter
@Converter(order=13) public static Writer toWriter(OutputStream out, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toReader
-
toInputStream
@Converter(order=15) public static InputStream toInputStream(String text, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toInputStream
@Converter(order=16) public static InputStream toInputStream(StringBuffer buffer, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toInputStream
@Converter(order=17) public static InputStream toInputStream(StringBuilder builder, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toInputStream
@Converter(order=18) public static InputStream toInputStream(BufferedReader buffer, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toInputStream
@Converter(order=19) public static InputStream toInputStream(Reader buffer, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toString
@Converter(order=20) public static String toString(byte[] data, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toString
@Converter(order=21) public static String toString(File file, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toString
@Converter(order=22) public static String toString(Path file, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toByteArray
- Throws:
IOException
-
toByteArray
- Throws:
IOException
-
toByteArray
@Converter(order=25) public static byte[] toByteArray(BufferedReader reader, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toString
@Converter(order=26) public static String toString(URL url, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toString
- Throws:
IOException
-
toString
- Throws:
IOException
-
toByteArray
@Converter(order=29) public static byte[] toByteArray(Reader reader, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toByteArray
@Converter(order=30) public static byte[] toByteArray(String value, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toString
@Converter(order=31) public static String toString(InputStream in, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toInputStream
-
toObjectOutput
@Converter(order=33) public static ObjectOutput toObjectOutput(OutputStream stream) throws IOException - Throws:
IOException
-
toObjectInput
@Converter(order=34) public static ObjectInput toObjectInput(InputStream stream, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toBytes
- Throws:
IOException
-
toByteArray
-
covertToByteBuffer
- Throws:
IOException
-
toString
@Converter(order=38) public static String toString(ByteArrayOutputStream os, org.apache.camel.Exchange exchange) throws IOException - Throws:
IOException
-
toInputStream
-
toProperties
- Throws:
IOException
-
toProperties
- Throws:
IOException
-
toProperties
- Throws:
IOException
-
toPath
-
toFile
-
toCharset
-