Hi, how's it going?
I recently came across the same issue, you have to explicitly request for both the resfile and the real document as separate bytes and then join them together. I found an example somewhere (I think it was the doc file on how to work with ODTransform xml files) and the author didn't explain that part of joining the resources and the doc, but here's it anyway...
//Obtain the resources and the document...
document = ODHIT_result.getDocument();
resources = ODHIT_result.getResources();
final_doc = new byte[document.length + resources.length];
//Copy both byte arrays... the resources have to come FIRST AT ALL TIMES!!!
System.arraycopy(resources,0,final_doc,0,resources.length);
System.arraycopy(document,0,final_doc,resources.length,document.length);
That's it, now the full document is located in byte[] final_doc
Hope that helps