Mam pliki, które wymagają dodatkowego atrybutu o nazwie "używane szyfrowanie". Ale to daje "IllegalArgumentExeption". Wiem, dlaczego daje ten błąd, "szyfrowanie używane" nie jest znane jako atrybut, ale czy istnieje sposób, w jaki mogę go wymusić? Lub dodać niestandardowe metadane do pliku?dodaj niestandardowy atrybut lub metadane do pliku java
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());
}
Czy ten atrybut oznacza, że plik 'encdec.properties' jest zaszyfrowany? –