Package it.tdlight.jni
Class TdApi.DownloadFile
java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function
it.tdlight.jni.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 int
CONSTRUCTOR
int
fileId
Identifier of the file to download.int
limit
Number of bytes which should be downloaded starting from the "offset" position before the download will be automatically canceled; use 0 to download without a limit.int
offset
The starting position from which the file should be downloaded.int
priority
Priority of the download (1-32).boolean
synchronous
If false, this request returns file state just after the download has been started. -
Constructor Summary
Constructors Constructor Description DownloadFile()
Downloads a file from the cloud.DownloadFile(int fileId, int priority, int offset, int limit, boolean synchronous)
Downloads a file from the cloud.DownloadFile(DataInput input)
-
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
int
getConstructor()
int
hashCode()
void
serialize(DataOutput output)
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 was called will be downloaded first. -
offset
public int offsetThe starting position from which the file should be downloaded. -
limit
public int limitNumber of bytes which should be downloaded starting from the "offset" position before the download will be automatically canceled; use 0 to download without a limit. -
synchronous
public boolean synchronousIf 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- See Also:
- Constant Field Values
-
-
Constructor Details
-
DownloadFile
public DownloadFile()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)Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.Returns
File
- 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 was called will be downloaded first.offset
- int The starting position from which the file should be downloaded.limit
- int Number of bytes which should be downloaded starting from the "offset" position before the download will be automatically canceled; use 0 to download without a limit.synchronous
- boolean 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.
-
DownloadFile
- 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()
-