InputStream inStream = new FileInputStream(from);
OutputStream outStream = new FileOutputStream(to);
// Replace default http port with provided port
SimpleTranslator trans = new SimpleTranslator();
trans.addFilter(new Tag("socket-binding", new AttributeEntry("name", "http")));
trans.addNewTag("socket-binding-group", new Tag("socket-binding", new AttributeEntry("name", "http"),
new AttributeEntry("port", String.valueOf(port))));
try {
trans.translate(inStream, outStream);
}
catch (XMLStreamException e) {