Package org.apache.camel.component.file

Examples of org.apache.camel.component.file.FileExchange


        // create the file
        template.sendBodyAndHeader("file://target/filelanguage", "Hello World", FileComponent.HEADER_FILE_NAME, "hello.txt");

        // get the file handle
        file = new File("target/filelanguage/hello.txt");
        Exchange answer = new FileExchange(context, ExchangePattern.InOut, file);

        Calendar cal = GregorianCalendar.getInstance();
        cal.set(1974, Calendar.APRIL, 20);
        answer.getIn().setHeader("birthday", cal.getTime());

        cal.set(2008, Calendar.AUGUST, 8);
        answer.getOut().setHeader("special", cal.getTime());
        return answer;
    }
View Full Code Here


        // create the file
        template.sendBodyAndHeader("file://target/filelanguage", "Hello World", FileComponent.HEADER_FILE_NAME, "hello.txt");

        // get the file handle
        file = new File("target/filelanguage/hello.txt");
        Exchange answer = new FileExchange(context, ExchangePattern.InOut, file);

        Calendar cal = GregorianCalendar.getInstance();
        cal.set(1974, Calendar.APRIL, 20);
        answer.getIn().setHeader("birthday", cal.getTime());

        cal.set(2008, Calendar.AUGUST, 8);
        answer.getOut().setHeader("special", cal.getTime());
        return answer;
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.file.FileExchange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.