download
Download a FileLink to a specified destination.
Same as calling download with a null listener
.
Return
a void Call which will return on success, or report an error otherwise.
See also
Parameters
the file link to be downloaded. Must not be null.
the sink that will receive the data. Must not be null.
Throws
on a null sink
argument.
Download a FileLink to a specified destination.
This call will get attempt to download the contents of the file that the provided fileLink
object was created for, optionally notifying about the progress via a provided ProgressListener. The content bytes will be delivered though the DataSink object.
See progressCallbackThreshold for details on how to control the progress notifications rate.
If set via callbackExecutor, the progress listener's methods will be scheduled on the provided Executor.
Refer to the file links documentation page for details on any ApiError errors.
Return
a void Call which will return on success, or report an error otherwise.
See also
Parameters
the file link to be downloaded. Must not be null.
the sink that will receive the data. Must not be null.
an optional listener that will get notified on progress. If null, no progress will be reported.
Throws
on a null sink
argument.
Get the content of a specified remote file.
This call is a shorthand for obtaining a FileLink object via createFileLink with DEFAULT, then using it with the download method.
Refer to the file links documentation page for details on any ApiError errors.
NOTE: It is the caller's responsibility to close the resulting object or resource leaks will occur.Return
Call which results in a bytes source
See also
Parameters
target file. Must not be null.
Throws
on a null file
argument.
Get the content of a specified file link.
Upon success, this call will return a bytes source of the file that the provided fileLink
object was created for.
Refer to the file links documentation page for details on any ApiError errors.
NOTE: It is the caller's responsibility to close the resulting object or resource leaks will occur.Return
Call which results in a bytes source
Parameters
the file link to be downloaded. Must not be null.
Throws
on a null fileLink
argument.