code: private static File materializeDescriptor(ResourceSpecifier resource)
              throws IOException, SAXException {
          File tempDesc = File.createTempFile("desc", ".xml");
          // tempDesc.deleteOnExit();
  
          BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
                  new FileOutputStream(tempDesc), "UTF-8"));
          resource.toXML(out);
          out.close();
  
          return tempDesc;
      }
docs: Writes a temporary file containing a xml descriptor of the given
  resource. Returns the file.
  
  @param resource
  A resource specifier that should we materialized.
  @return The file containing the xml representation of the given resource.
  @throws IOException
  @throws SAXException