You may want to change the javadoc because this is now possible to use saveIncremental() function on PDDocument loaded with InputStream.
I checked this and yes, it works with a stream, because since the rewrite of the caching stuff, the stream contents are stored in a file or in memory when the PDF is loaded from a stream. The javadoc wasn't changed in rev 1688018.
Then I tried this:
this results in an NPE. So I'm adding a check in saveIncremental(), similar to the check that was removed in 1688018, likely because nobody thought about the weird code above.