public ArrayList<Entry> process(File inputFileOrDir,File outputRoot) throws Exception {
  if (!inputFileOrDir.exists())   throw new IllegalArgumentException("Input file does not exist: " + inputFileOrDir.getAbsolutePath());
  if (inputFileOrDir.isFile())   return process(new File[]{inputFileOrDir},outputRoot);
 else   return process(inputFileOrDir.listFiles(),outputRoot);
}

public ArrayList < Entry > process ( File inputFileOrDir , File outputRoot ) throws Exception { if ( ! inputFileOrDir . exists ( ) ) throw new IllegalArgumentException ( "Input file does not exist: " + inputFileOrDir . getAbsolutePath ( ) ) ; if ( inputFileOrDir . isFile ( ) ) return process ( new File [ ] { inputFileOrDir } , outputRoot ) ; else return process ( inputFileOrDir . listFiles ( ) , outputRoot ) ; }
processes the specified input file or directory .
