Document(InputStream) method fails with exception


Document(InputStream) fails with the following exception:

Can't completely read inputStream, available() = 0, readed = -1


Please check if the stream actually contains data and its pointer is correctly positioned to the beginning of the document data. If all of the above is correct, then please save the problem stream to binary file and attach it here.