2013-03-19 1 views
0

작성한 메소드가 도달 할 수없는 것처럼 보입니다. 나는 아래의 방법을 붙여 해요 : encryption.decrypt_data(new FileInputStream("C:/Users/Acer/Desktop/encrypted"),new FileOutputStream("C:/Users/Acer/Desktop/decrypted")); Class_name 유형에 대해 method_name (FileInputStream, FileOutputStream) 메소드가 정의되지 않았습니다.

이클립스는 저에게 말한다 : 나는 다음과 같이 클래스의 인스턴스를 사용하여이 메서드를 호출하기 위해 노력하고있어

 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(); 
    } 

(메소드 decrypt_data을 FileInputStream에를, 다음 메서드 호출이 완벽하게 잘 작동하지만 FileOutputStream에)는 유형 AES (예 : 클래스 이름)

에 대한 정의입니다 :

encryption.encrypt_data(new FileInputStream(fc.getSelectedFile().getPath()),new FileOutputStream("C:/Users/Acer/Desktop/encrypted"));

도움을 기다리고 있습니다. D Thanks.

+0

는 별도의 문제로 문의하시기 바랍니다. 질문을 완전히 바꾸면 답변에서 연결이 끊어 지므로 사람들에게 도움이되지 않습니다. –

+0

좋아요. 죄송 해요. – SidNoob

+0

너무 현지화 된 것으로 닫습니다. 철자법상의 실수로 다른 사람을 도울 수 없기 때문에 어떤 방식 으로든 당신을 처벌 할 수는 없습니다. –

답변

2

맞춤법 오류 decryt_datadecrypt_data이어야합니다. 당신이 새로운 질문이있는 경우

귀하의 방법을 public void decryt_data(InputStream in, OutputStream out)라고하는 p 대신 decrypt_data의) (decryt

+0

지금 잠이 필요해 보인다. 고마워요 톤 : D – SidNoob

+0

지금 나는 새로운 오류에 직면 해있다. 나는 그 질문을 수정했다. – SidNoob

+0

새로운 문제로 새로운 질문으로 게시하고이 질문을 이전 형식으로 되 돌리십시오. –

0

통화 decryt_data에서 누락이()