public Future < UploadDocumentStreamResult > uploadDocumentStreamAsync ( final UploadDocumentStreamRequest uploadDocumentStreamRequest ) throws IllegalArgumentException { Callable < UploadDocumentStreamResult > task = new Callable < UploadDocumentStreamResult > ( ) { public UploadDocumentStreamResult call ( ) { return uploadDocumentStream ( uploadDocumentStreamRequest ) ; } } ; return executorService . submit ( task ) ; }
Asynchronously uploads stream to given folder and document name . Client must close the input stream once upload operation is complete .