class XMLUtilities {

    public static InputStream writeXMLObjectToInputStreamSync(final Object jaxbElement, Class<?>... classes) throws JAXBException
    {
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        writeXMLObject(jaxbElement, os, classes);
        return new ByteArrayInputStream(os.toByteArray());
    }

    private  XMLUtilities();

}