public static String transformFilename(String fileName){
  if (!fileName.endsWith(".fb")) {
    fileName=fileName + ".fb";
  }
  return fileName;
}

public static String transformFilename ( String fileName ) { if ( ! fileName . endsWith ( ".fb" ) ) { fileName = fileName + ".fb" ; } return fileName ; }
transform a user - entered filename into a proper filename , by adding the " . fb " file extension if it isn ' t already present .
