- Enclosing class:
- TdApi
Downloads a file from the cloud.
Download progress and completion of
the download will be notified through updateFile updates.
Returns
File
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
int
Identifier of the file to download.long
Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit.long
The starting position from which the file needs to be downloaded.int
Priority of the download (1-32).boolean
Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started. -
Constructor Summary
ConstructorDescriptionDownloads a file from the cloud.DownloadFile
(int fileId, int priority, long offset, long limit, boolean synchronous) Downloads a file from the cloud.DownloadFile
(DataInput input) Downloads a file from the cloud. -
Method Summary
Methods inherited from class it.tdlight.jni.TdApi.Function
toString
Methods inherited from class it.tdlight.jni.TdApi.Object
serialize
-
Field Details
-
fileId
public int fileIdIdentifier of the file to download. -
priority
public int priorityPriority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first. -
offset
public long offsetThe starting position from which the file needs to be downloaded. -
limit
public long limitNumber of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit. -
synchronous
public boolean synchronousPass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started. -
CONSTRUCTOR
public static final int CONSTRUCTOR- See Also:
-
-
Constructor Details
-
DownloadFile
public DownloadFile()Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates. ReturnsFile
-
DownloadFile
public DownloadFile(int fileId, int priority, long offset, long limit, boolean synchronous) Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates. ReturnsFile
- Parameters:
fileId
- int Identifier of the file to download.priority
- int Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first.offset
- long The starting position from which the file needs to be downloaded.limit
- long Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit.synchronous
- boolean Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started.
-
DownloadFile
Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates. ReturnsFile
- Throws:
IOException
-
-
Method Details
-
getConstructor
public int getConstructor()- Specified by:
getConstructor
in classTdApi.Object
-
serialize
- Specified by:
serialize
in classTdApi.Object
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-