private static void writeXml(Object bean,OutputStream os,boolean fragment) throws JAXBException {
  final Marshaller m=createMarshaller();
  if (fragment)   m.setProperty(m.JAXB_FRAGMENT,Boolean.TRUE);
  m.marshal(bean,os);
}

private static void writeXml ( Object bean , OutputStream os , boolean fragment ) throws JAXBException { final Marshaller m = createMarshaller ( ) ; if ( fragment ) m . setProperty ( m . JAXB_FRAGMENT , Boolean . TRUE ) ; m . marshal ( bean , os ) ; }
writes the given bean to the given output stream .
