int BUFFERLEN = 512; 
                  FileInputStream in = new FileInputStream(fPath1+fnn);  
          File file = new File(fPath+fnn);
 if (!file.exists())
 file.createNewFile();  FileOutputStream out = new FileOutputStream(file);
 int c, pos, keylen;
 pos = 0;
                  byte[] KEYVALUE=this.pwd.getBytes();
          keylen = KEYVALUE.length;
        byte buffer[] = new byte[BUFFERLEN];
       while ((c = in.read(buffer)) != -1) {
         for (int i = 0; i < c; i++) {
                 buffer[i] ^= KEYVALUE[pos];
         out.write(buffer[i]);
         pos++; 
         if (pos == keylen){
pos = 0;
}
如何判断解密是否成功,该怎么写?密码是通过PWD传进来的值