code: private void writeMapFile(String mapFileName, File jarFile, boolean mapClassMethods) throws IOException, XMLStreamException, ClassNotFoundException, IntrospectionException
     {
        FileWriter fw = new FileWriter(mapFileName);
        XMLOutputFactory xof = XMLOutputFactory.newInstance();
        XMLStreamWriter writer = xof.createXMLStreamWriter(fw);
        //XMLStreamWriter writer = new IndentingXMLStreamWriter(xof.createXMLStreamWriter(fw));
  
        writer.writeStartDocument();
        writer.writeStartElement("root");
        writer.writeStartElement("assembly");
  
        addClasses(writer, jarFile, mapClassMethods);
  
        writer.writeEndElement();
        writer.writeEndElement();
        writer.writeEndDocument();
        writer.flush();
        writer.close();
  
        fw.flush();
        fw.close();
     }
docs: Generate an IKVM map file.
  
  @param mapFileName map file name
  @param jarFile jar file containing code to be mapped
  @param mapClassMethods true if we want to produce .Net style class method names
  @throws IOException
  @throws XMLStreamException
  @throws ClassNotFoundException
  @throws IntrospectionException