/** * Gets a serialized representation of a {@link HostRegistration} * * @param registration * The host registration to marshal * @return the serialized host registration */ public static InputStream toXmlStream(HostRegistration registration) throws IOException { return IOUtils.toInputStream(toXml(registration), "UTF-8"); }
/** * Parses an xml string representing a {@link HostRegistration} * * @param xml * The serialized data * @return The HostRegistration */ public static HostRegistration parseXml(String xml) throws IOException { return parse(IOUtils.toInputStream(xml, "UTF-8")); }