title: type conversion in apache camel
body: <p>I am pretty new to Apache Camel and currently I am making a test project. Currently I am trying to write some previously processed objects from custom class into a file using the file component (i dont know a better option).</p>
  
  <pre><code>from("direct:processedDecimals")
              .to("file:data/output")
  </code></pre>
  
  <p>but i have the following problem</p>
  
  <pre><code>   Caused by: org.apache.camel.InvalidPayloadException: No body available of type: java.io.InputStream but has value: Add{x=5.63, y=78.016} of type: org.example.math.Add on: Message[ID-NTB828-1537281187742-0-10]. Caused by: No type converter available to convert from type: org.example.math.Add to the required type: java.io.InputStream with value Add{x=5.63, y=78.016}. Exchange[ID-NTB828-1537281187742-0-9]. Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: org.example.math.Add to the required type: java.io.InputStream with value Add{x=5.63, y=78.016}]
  </code></pre>
  
  <p>I saw on the internet that some people suggests writing custom TypeConverter and then register it in a file in the WEB-INF folder. But I am using SpringBoot and its internal Tomcat and I dont have this directory.</p>