public File saveTemp(String tempName,String extension) throws IOException {
  File file=File.createTempFile(tempName,"." + extension);
  save(file,extension);
  return file;
}

public File saveTemp ( String tempName , String extension ) throws IOException { File file = File . createTempFile ( tempName , "." + extension ) ; save ( file , extension ) ; return file ; }
save a file temporary .
