Java 如何删除添加到文件中的名称?
我正在读取一个文件名并对其进行加密,然后使用其他名称进行保存Java 如何删除添加到文件中的名称?,java,encryption,Java,Encryption,我正在读取一个文件名并对其进行加密,然后使用其他名称进行保存 FileInputStream inFile = new FileInputStream("cv-resume.pdf"); //encrypt FileOutputStream outFile = new FileOutputStream("cv-resume.pdf"+".enc"); 解密后,我想删除“.enc”以恢复原始文件名。你知道怎么做吗?谢谢你的帮助。你试过这个吗 FileOutputStream inFileEncr
FileInputStream inFile = new FileInputStream("cv-resume.pdf");
//encrypt
FileOutputStream outFile = new FileOutputStream("cv-resume.pdf"+".enc");
解密后,我想删除“.enc”以恢复原始文件名。你知道怎么做吗?谢谢你的帮助。你试过这个吗
FileOutputStream inFileEncrypt = new FileInputStream("cv-resume.pdf.enc");
//Decrypt
FileOutputStream outFileDecrypt = new FileOutputStream("cv-resume.pdf");
你是说,你想将
cv resume.pdf.enc
重新命名为cv resume.pdf
?您不能使用文件重命名API吗?