code: @Nonnull
      public static File changeExtension(@Nonnull File dst, @Nonnull String ext) {
          String p = dst.getPath();
          int pos = p.lastIndexOf('.');
          if (pos<0)  return new File(p+ext);
          else        return new File(p.substring(0,pos)+ext);
      }
docs: Returns a file name by changing its extension.
  
  @param ext
  For example, ".zip"