*/
public void getGoogleDriveOutputStream(XThreadInputStream inputStream, String documentURI) throws IOException {
// Create an object that implements outputstream but pushes everything through to the designated input stream
OutputStream outputStream = new XThreadOutputStream(inputStream);
try {
MediaHttpDownloader downloader =
new MediaHttpDownloader(HTTP_TRANSPORT, drive.getRequestFactory().getInitializer());
downloader.setDirectDownloadEnabled(false);
downloader.download(new GenericUrl(documentURI), outputStream);
} finally {
// Make sure it is closed and flushed
outputStream.close();
}
}