code: public void saveXml(T jaxbBean, OutputStream outputStream) {
  
      try {
        validate(jaxbBean);
        getOrCreateMarshaller().marshal(jaxbBean, outputStream);
      } catch (MarshalException e) {
        throw new XmlInvalidException(e, jaxbBean);
      } catch (JAXBException e) {
        throw new IllegalStateException(e);
      }
    }
docs: This method saves the given {@code jaxbBean} as XML to the given {@code outputStream}. <br>
  <b>ATTENTION:</b><br>
  The caller of this method has to {@link OutputStream#close() close} the {@code outputStream}.
  
  @param jaxbBean is the JAXB-bean to save as XML.
  @param outputStream is the {@link OutputStream} where to write the XML to.