I am trying to load .dot file from database BLOB in web application. However, i am getting the following error
Caused by: java.lang.IllegalStateException: XMLStreamException: Unexpected EOF in prolog
when i try to load the same document from file system using file input stream it is working fine.
Here is the code that i tried to load. Please advice.
InputStream in = new BufferedInputStream(getLtrHeadBlb().getBinaryStream());
LoadOptions loadOptions = new LoadOptions();
//Get document bytes
byte docBytes = getBytesFromInputStream(in);
InputStream docStream = new ByteArrayInputStream(docBytes);
Document doc = new Document(docStream,loadOptions);
ByteArrayOutputStream str = new ByteArrayOutputStream();