我写的方法似乎无法访问。我下面粘贴的方法:方法method_name(FileInputStream,FileOutputStream)未定义类型Class_name
public void decryt_data(InputStream in, OutputStream out) throws InvalidKeyException, IOException {
// initialize the cipher
cipher.init(Cipher.DECRYPT_MODE, secret_key);
// Bytes read from in will be decrypted
in = new CipherInputStream(in, cipher);
int numRead = 0;
while ((numRead = in.read(buf)) >= 0)
{
out.write(buf, 0, numRead);
}
out.close();
}
我试图使用类的一个实例如下调用这个方法: encryption.decrypt_data(new FileInputStream("C:/Users/Acer/Desktop/encrypted"),new FileOutputStream("C:/Users/Acer/Desktop/decrypted"));
Eclipse的告诉我:该方法decrypt_data(的FileInputStream, FileOutputStream中)是未定义的类型AES(即类名)
然而,下面的方法调用工作完全正常:
encryption.encrypt_data(new FileInputStream(fc.getSelectedFile().getPath()),new FileOutputStream("C:/Users/Acer/Desktop/encrypted"));
等待一些帮助:D谢谢。
如果你有一个新的问题,请它作为一个单独的问题。彻底改变你的问题将它从答案中断开,并对没有帮助的人无益 – 2013-03-19 05:13:52
好的。对不起。 – SidNoob 2013-03-19 07:59:02
将其关闭为太本地化。这不是以任何方式惩罚你,只是因为拼写错误不太可能帮助其他任何人。 – 2013-03-20 00:08:57