Exception When Creating Document Builder From InputStream


The following error occurs when I try to create a Document from a .doc file InputStream:

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

Here is the code...

InputStream ios =
try {
Document doc = new Document( ios ); << Exception occurs here.
DocumentBuilder builder = new DocumentBuilder(doc);


Please make sure that the stream actually contains document data and is positioned to the beginning.