title: add custom attribute or metadata to file java
body: <p>I have files that need an extra attribute called "encryption used". But this gives "IllegalArgumentExeption". I know why it gives that error, "encryption used" isn't known as an attribute, but is there a way I can force it to be? Or add custom metadata to the file?</p>
  
  <pre><code> Path path = new File("/propertyfiles/encdec.properties").toPath();
  
      try{
          Files.setAttribute(path, "encryption used", "testtesttest");
      }catch(IOException e){
          System.out.println(e.getMessage());
      }
      try{
          System.out.println(Files.getAttribute(path, "encryption used"));
      }catch(IOException e){
          System.out.println(e.getMessage());
      }
  </code></pre>