public void snapshot() throws IOException {
  fileCount=0;
  failedCount=0;
  final boolean wasLogging=enableLogging(false);
  try {
    Iterator iter=listInputFiles(sourceDir);
    while (iter.hasNext()) {
      File file=(File)iter.next();
      saveBoxModel(file,outputDir,width);
      saveImage(file,outputDir,width);
    }
  }
  finally {
    enableLogging(wasLogging);
  }
}

public void snapshot ( ) throws IOException { fileCount = 0 ; failedCount = 0 ; final boolean wasLogging = enableLogging ( false ) ; try { Iterator iter = listInputFiles ( sourceDir ) ; while ( iter . hasNext ( ) ) { File file = ( File ) iter . next ( ) ; saveBoxModel ( file , outputDir , width ) ; saveImage ( file , outputDir , width ) ; } } finally { enableLogging ( wasLogging ) ; } }
for all files in the input directory , attempts to render and output a textual box model and a png file in the output directory . does not zip the contents of the output directory . any single file that fails to render will not halt the process . low - level io errors will may , however , interrupt it . both the file count and the failed count are reset on starting ; on finishing those values can be read through their respective accessors in this class .
