byte[] value = { 4, 6, 99, 5 };
byte[] encodedValue = Base64.encodeBase64(value);
XmlRpcBase64 xmlRpcBase64 = new XmlRpcBase64(value);
XmlRpcElement[] parameters = { xmlRpcBase64 };
XmlRpcResponse response = new XmlRpcResponse(parameters);
StringBuffer builder = new StringBuffer(256);
builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
builder.append("<methodResponse><params><param><value><base64>");
builder.append(new String(encodedValue, 0, encodedValue.length));