I tried as you said .and i got my Exception
Exception in thread "main" java.lang.UnsupportedOperationException at java.util.Collections$UnmodifiableCollection.add(Unknown Source)
The return value is specifically designed not to allow additions or removals from the List. So it throws Exceptions if you try to use the unimplemented methods.
If the original List changes, the "unmodifiable" copy changes to match, however.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: UnsuppourtedOperationException when tried to modify the Collections.unmodifiable format .