private static void generateGraphFile(TransMeta transMeta,String graphFile) throws GraphGeneratorException {
  DataOutputStream dos=null;
  try {
    String xml=transMeta.getXML();
    dos=new DataOutputStream(new FileOutputStream(new File(graphFile)));
    dos.write(xml.getBytes(CarbonCommonConstants.DEFAULT_CHARSET));
  }
 catch (  KettleException kettelException) {
    throw new GraphGeneratorException("Error while getting the graph XML",kettelException);
  }
catch (  FileNotFoundException e) {
    throw new GraphGeneratorException("Unable to find the graph fileL",e);
  }
catch (  UnsupportedEncodingException ue) {
    throw new GraphGeneratorException("Error while Converting the graph xml string to bytes",ue);
  }
catch (  IOException ioe) {
    throw new GraphGeneratorException("Error while writing the graph file",ioe);
  }
 finally {
    if (dos != null) {
      try {
        dos.close();
      }
 catch (      IOException e) {
        e.getMessage();
      }
    }
  }
}

private static void generateGraphFile ( TransMeta transMeta , String graphFile ) throws GraphGeneratorException { DataOutputStream dos = null ; try { String xml = transMeta . getXML ( ) ; dos = new DataOutputStream ( new FileOutputStream ( new File ( graphFile ) ) ) ; dos . write ( xml . getBytes ( CarbonCommonConstants . DEFAULT_CHARSET ) ) ; } catch ( KettleException kettelException ) { throw new GraphGeneratorException ( "Error while getting the graph XML" , kettelException ) ; } catch ( FileNotFoundException e ) { throw new GraphGeneratorException ( "Unable to find the graph fileL" , e ) ; } catch ( UnsupportedEncodingException ue ) { throw new GraphGeneratorException ( "Error while Converting the graph xml string to bytes" , ue ) ; } catch ( IOException ioe ) { throw new GraphGeneratorException ( "Error while writing the graph file" , ioe ) ; } finally { if ( dos != null ) { try { dos . close ( ) ; } catch ( IOException e ) { e . getMessage ( ) ; } } } }
generate the graph file . . .
