title: JAXB - why can i only marshal to a stream/file?
body: <p>i´m currently working on a project, with following architecture:</p>
  
  <p>project A (shall storage files into a folder. Shall take byte[] and name and should write the data in a file. Not more, just a dumb file-writer application)</p>
  
  <p>project B (shall read data from database, generates a xml file of it and sends that as byte[] to project A, which writes this in filesystem)</p>
  
  <p>Now my problem: In project B, i want to generate the xml-file as an object, but the API of the Jaxb-Marshaller gives only marshal() methods, which takes as argument a Writer/File/OutputStream...And i don´t want to give a File or OutputStream in the project B- this should be task of Project A...</p>
  
  <p>So why is there no method which returns the generated XML as Object or as byte[] or else?</p>