如何用Java实现文件的加密与解密
                                            今天带来的java小项目实现文件加密解密,核心代码已展示出来
界面展示:
在永靖等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供成都做网站、网站设计、外贸营销网站建设 网站设计制作按需开发,公司网站建设,企业网站建设,品牌网站建设,营销型网站,外贸网站制作,永靖网站建设费用合理。

部分代码展示:
package wt.diy.encryption.gui;
import java.io.File;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import wt.diy.encryption.service.ServiceContext;
public class Context {
ServiceContext service;
EncryptionFrame frame;
public Context(ServiceContext service) {
this.service = service;
}
public void setFrame(EncryptionFrame frame) {
    this.frame = frame;
}
public void excute(String source,String destiny, String key,JFrame frame) {
    File file = new File(destiny);
    if(!this.frame.getRadio().isSelected()&&file.exists()){
        JOptionPane.showMessageDialog(frame, “文件已经存在”);
        return ;
    }
    service.excute(source, destiny, key);
}
public void showMe(){
    frame.setVisible(true);
}
public String open(JFrame frame) {
    JFileChooser jfc = new JFileChooser();
    jfc.showOpenDialog(frame);
    File f = jfc.getSelectedFile();
    return f.getAbsolutePath();
}}
分享文章:如何用Java实现文件的加密与解密
转载来于:http://www.scyingshan.cn/article/jgsodo.html

 建站
建站
 咨询
咨询 售后
售后
 建站咨询
建站咨询 
 