OfficeDev / Office-365-SDK-for-Java

Office 365 client for Java
Other
48 stars 39 forks source link

sharepoint-services-java - Is it possible to get InputStream from DocLibClient? #10

Open danielsjolin opened 8 years ago

danielsjolin commented 8 years ago

Hi.

I'm investigating if this SDK might be a good choice for my organization for sharepoint file handling via REST. I'm using the DocLibClient from sharepoint-services-java to handle files and folders on a sharepoint site. When I'm downloading a file, I can see no other option than to call getFile which loads the entire file contents into a byte arrray. This of course consumes a lot of memory if it is a large file.

Is it possible to create a method with the following signature?

public ListenableFuture<InputStream> getFile(String path) {...}

This would allow us to handle the download from the stream in a convenient way.

Regards Daniel Rehnberg