code: public static File  withDefaultType( File file, Type defaultType)
      {
      return
        file != null && FilenameUtils.getExtension( file.getName()).isEmpty()
        ? new File( String.format( "%s.%s", file.getPath(), String.valueOf( defaultType).toLowerCase()))
        : file;
      }
docs: Returns the given file name, assigning the default type if no type defined.