*             加密后存放的文件名 如 c:/ 加密后文件 .txt 
      */  
    public void encryptFile(String file, String destFile) throws Exception {  
       Cipher cipher = Cipher.getInstance ( "DES" );  
       // cipher.init(Cipher.ENCRYPT_MODE, getKey());  
       cipher.init(Cipher. ENCRYPT_MODE , this . key );  
       InputStream is = new FileInputStream(file);  
       OutputStream out = new FileOutputStream(destFile);  
       CipherInputStream cis = new CipherInputStream(is, cipher);  
       byte [] buffer = new byte [1024];  
       int r;  
       while ((r = cis.read(buffer)) > 0) {  
           out.write(buffer, 0, r);  
       }  
       cis.close();  
       is.close();  
       out.close();  
    }