return new RouteBuilder() {
@Override
public void configure() {
// QR-Code default
DataFormat code1 = new BarcodeDataFormat();
from("direct:code1")
.marshal(code1)
.to(FILE_ENDPOINT);
// QR-Code with modified size
DataFormat code2 = new BarcodeDataFormat(200, 200);
from("direct:code2")
.marshal(code2)
.to(FILE_ENDPOINT);
// QR-Code with JPEG type
DataFormat code3 = new BarcodeDataFormat(BarcodeImageType.JPG);
from("direct:code3")
.marshal(code3)
.to(FILE_ENDPOINT);
// PDF-417 code with modified size and image type
DataFormat code4 = new BarcodeDataFormat(200, 200, BarcodeImageType.JPG, BarcodeFormat.PDF_417);
from("direct:code4")
.marshal(code4)
.to(FILE_ENDPOINT);
// AZTEC with modified size and PNG type
DataFormat code5 = new BarcodeDataFormat(200, 200, BarcodeImageType.PNG, BarcodeFormat.AZTEC);
from("direct:code5")
.marshal(code5)
.to(FILE_ENDPOINT);