title: Create a file protected by a password in java
body: <p>I would like to create a file protected by a password in JAVA.
  What I mean is, once I launch the program, one file created by my program would be directly protected by previously determined password.</p>
  
  <p>Is there an easy way to do it ?</p>
  
  <p>Once again, my aim is not to create a file and then add it a password, but right during the creation protecting the file by a password.
  <strong>Actually, I want the current runner program not having access in reading/editing the created file EXCEPT if he/she has the password previously set.</strong></p>
  
  <p>So anyway, if some of you know an easy way to protect files when writing them thanks to java, I would be most grateful.</p>
  
  <p>Have a nice day!</p>