public Future < GetDocumentStreamResult > getDocumentStreamAsync ( final GetDocumentStreamRequest getDocumentStreamRequest ) { Callable < GetDocumentStreamResult > task = new Callable < GetDocumentStreamResult > ( ) { public GetDocumentStreamResult call ( ) { return getDocumentStream ( getDocumentStreamRequest ) ; } } ; return executorService . submit ( task ) ; }
Asynchronously gets document stream of latest version of given document and version ID . If version ID is null it retrieves latest version of requested document ID . Clients must close the stream once content is read .