private static String nextGraphFileName(Body b,String baseName) throws java.io.IOException {
  File dir=makeDirectoryIfMissing(b);
  final String prefix=dir.toString() + File.separatorChar + baseName;
  File file=null;
  int fileNumber=0;
  do {
    file=new File(prefix + fileNumber + DotGraph.DOT_EXTENSION);
    fileNumber++;
  }
 while (file.exists());
  return file.toString();
}

private static String nextGraphFileName ( Body b , String baseName ) throws java . io . IOException { File dir = makeDirectoryIfMissing ( b ) ; final String prefix = dir . toString ( ) + File . separatorChar + baseName ; File file = null ; int fileNumber = 0 ; do { file = new File ( prefix + fileNumber + DotGraph . DOT_EXTENSION ) ; fileNumber ++ ; } while ( file . exists ( ) ) ; return file . toString ( ) ; }
returns the next available name for a graph file .
