Package org.drinkless.tdlib
Class TdApi.DownloadFile
- java.lang.Object
-
- org.drinkless.tdlib.TdApi.Object
-
- org.drinkless.tdlib.TdApi.Function
-
- org.drinkless.tdlib.TdApi.DownloadFile
-
- Enclosing class:
- TdApi
public static class TdApi.DownloadFile extends TdApi.Function
Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.Returns
File
-
-
Field Summary
Fields Modifier and Type Field Description static intCONSTRUCTORIdentifier uniquely determining type of the object.intfileIdIdentifier of the file to download.intlimitNumber 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.intoffsetThe starting position from which the file needs to be downloaded.intpriorityPriority of the download (1-32).booleansynchronousIf false, this request returns file state just after the download has been started.
-
Constructor Summary
Constructors Constructor Description DownloadFile()Default constructor for a function, which downloads a file from the cloud.DownloadFile(int fileId, int priority, int offset, int limit, boolean synchronous)Creates a function, which downloads a file from the cloud.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetConstructor()-
Methods inherited from class org.drinkless.tdlib.TdApi.Function
toString
-
-
-
-
Field Detail
-
fileId
public int fileId
Identifier of the file to download.
-
priority
public int priority
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 was called will be downloaded first.
-
offset
public int offset
The starting position from which the file needs to be downloaded.
-
limit
public int limit
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
public boolean synchronous
If false, this request returns file state just after the download has been started. If true, this request returns file state only after the download has succeeded, has failed, has been canceled or a new downloadFile request with different offset/limit parameters was sent.
-
CONSTRUCTOR
public static final int CONSTRUCTOR
Identifier uniquely determining type of the object.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DownloadFile
public DownloadFile()
Default constructor for a function, which downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.Returns
File
-
DownloadFile
public DownloadFile(int fileId, int priority, int offset, int limit, boolean synchronous)Creates a function, which downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.Returns
File- Parameters:
fileId- Identifier of the file to download.priority- 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 was called will be downloaded first.offset- The starting position from which the file needs to be downloaded.limit- 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- If false, this request returns file state just after the download has been started. If true, this request returns file state only after the download has succeeded, has failed, has been canceled or a new downloadFile request with different offset/limit parameters was sent.
-
-
Method Detail
-
getConstructor
public int getConstructor()
- Specified by:
getConstructorin classTdApi.Object- Returns:
- this.CONSTRUCTOR
-
-