anchor.diff:  
   [source,java]
   ---------------------------------------------------------------------------------
  -    public void process(Exchange exchange) throws Exception {
  -        // the API is a bit clunky so we need to loop
  -        Map<String, DataHandler> attachments = exchange.getIn().getAttachments();
  -        if (attachments.size() > 0) {
  -            for (String name : attachments.keySet()) {
  -                DataHandler dh = attachments.get(name);
  -                // get the file name
  -                String filename = dh.getName();
  -
  -                // get the content and convert it to byte[]
  -                byte[] data = exchange.getContext().getTypeConverter()
  -                                  .convertTo(byte[].class, dh.getInputStream());
  -
  -                // write the data to a file
  -                FileOutputStream out = new FileOutputStream(filename);
  -                out.write(data);
  -                out.flush();
  -                out.close();
  -            }
  +public void process(Exchange exchange) throws Exception {
  +    // the API is a bit clunky so we need to loop
  +    Map<String, DataHandler> attachments = exchange.getIn().getAttachments();
  +    if (attachments.size() > 0) {
  +        for (String name : attachments.keySet()) {
  +            DataHandler dh = attachments.get(name);
  +            // get the file name
  +            String filename = dh.getName();
  +
  +            // get the content and convert it to byte[]
  +            byte[] data = exchange.getContext().getTypeConverter()
  +                              .convertTo(byte[].class, dh.getInputStream());
  +
  +            // write the data to a file
  +            FileOutputStream out = new FileOutputStream(filename);
  +            out.write(data);
  +            out.flush();
  +            out.close();
           }
  -   }
  +    }
  +}
   ---------------------------------------------------------------------------------
   
   As you can see the API to handle attachments is a bit clunky but it's
  
positive.code: // endpoint options: END
  
  
  
  
  
  === Sample endpoints
  
  Typically, you specify a URI with login credentials as follows (taking
  
negative.code: 
   
  
  You can also split the attachments as byte[] to
  be stored as the message body. This is done by creating the expression
  with boolean true
  
  