I came across this issue when implementing the interface Iterator.
The operation remove() is "optional", and shall you not want to support it, the exception that should be thrown is UnsupportedOperationException, which is a RuntimeException.
You will not be able to throw OperationNotSupportedException because it is a checked exception, unless the interface methods declares that you can do so.
Whenever you come across an "optional" operation just read the API documentation that should specify which exception should be thrown when the operation is not supported.
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