public static final GCodeFlavor tasteFlavor(File file) throws IOException, GCodeParseException {
  if (file.exists())   throw new GCodeParseException("Passed file does not exist.");
  if (!file.isFile())   throw new GCodeParseException("This is not a file.");
  final BufferedInputStream buffer=new BufferedInputStream(new FileInputStream(file));
  GCodeFlavor ret=tasteFlavor(buffer);
  buffer.close();
  return ret;
}

public static final GCodeFlavor tasteFlavor ( File file ) throws IOException , GCodeParseException { if ( file . exists ( ) ) throw new GCodeParseException ( "Passed file does not exist." ) ; if ( ! file . isFile ( ) ) throw new GCodeParseException ( "This is not a file." ) ; final BufferedInputStream buffer = new BufferedInputStream ( new FileInputStream ( file ) ) ; GCodeFlavor ret = tasteFlavor ( buffer ) ; buffer . close ( ) ; return ret ; }
determine the content generator ( i . e . slic3r , skeinforge ) for the given file .
