title: How to convert a file to a byte array in Mule ESB?
body: <p>I'm POSTing a png file to an HTTP inbound endpoint in Mule.  I want to process the file using Java and store the altered image in a database.  Do I need to transform the image in to another format explicitly (e.g. in to a byte array using a Java object), or is there a more streamlined method in Mule to pass the image to my Java bean for processing?  Mule code examples would be helpful.</p>
  
  <p>--- update ---</p>
  
  <p>Based on Chad's response below, is this the way to handle it?  I'm not sure how the code would look to pass it to my Java bean though.</p>
  
  <pre><code>&lt;flow name="flow1" doc:name="flow1"&gt;
      &lt;http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/&gt;
      &lt;object-to-byte-array-transformer doc:name="Object to Byte Array"/&gt;
      &lt;???&gt;
  &lt;/flow&gt;
  </code></pre>