You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Base64 Data Format

Available as of Camel 2.11
The Base64 Data Format is a data format for base64 encoding and decoding.

Options

Option

Default

Description

lineLength

76

To specific a maximum line length for the encoded data.

lineSeparator

\r\n

The line separators to use.

urlSafe

false

Instead of emitting '+' and '/' we emit '-' and '_' respectively. urlSafe is only applied to encode operations. Decoding seamlessly handles both modes.

Marshal

In this example we marshal the file content to base64 object.

from("file://data.bin").marshal().base64().to("jms://myqueue");

Unmarshal

In this example we unmarshal the payload from the JMS queue to a byte[] object, before its processed by the newOrder processor.

from("jms://queue/order").unmarshal().base64().processRef("newOrder");

Dependencies

This data format is provided in camel-base64 component.

  • No labels