Java SE doesn't know about the insides of many types of files.
You will have to
either find a third party package that does know how to make the changes you want to make
or you will need to get documentation for the layout of the contents of the file and write code to add to or update the contents of the file. If you find out what the contents of the file are, then we can help you write the code to change the file.