I want to read a document content from FileNetP8 parallel to reduce my reading time. Also the issue is I write into a OutputStream. Is there anyway or any API from where I can parallelize my reads into a OutputStream. I am asking this because I am sure IBM would have provided some way to do it.
Also because let's say if my file is 1GB, then sequential reads are going to be performance hit.
I think from a Document
instance there's only one API to retrieve the content - accessContentStream
which gives you an object of InputStream
. However, for reading huge files there's a new util class called ExtendedInputStream
which you might be interested in.
An ExtendedInputStream
is an input stream that can retrieve content at arbitrary positions within the stream. The ExtendedInputStream
class includes methods that can read a certain number of bytes from the stream or read an unspecified number of bytes. The stream keeps track of the last byte position that was read. You can specify a position in the input stream to get to a later or earlier position within the stream.
More details at :
Edit:
ExtendedInputStream
has been introduced in v5.2.1 and is not available if you are using older version P8.