In the example, they had to read a file, turn it into an InputStream, and then turn the InputStream into a Byte array. Your situation is much simpler. You've already got a Byte array. If arryByteXmlPayLoad is a Byte array, you don't need to turn it into an InputStream. Just write the Byte array directly to the OutputStream with no looping like this:
out.write(arryByteXmlPayLoad);
out.close();
You will also want to set the content type and declare it as an attachment like this:
response.setContentType("text/xml");
response.setHeader("Content-Disposition", "attachment; filename=\"myFile.xml\"";
Also, make sure you return null from your execute() method. This tells Struts that you've already handled the response and don't need to forward to a
JSP.