Module tdlight.api
Package it.tdlight.jni

# Class TdApi.RemoteFile

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.RemoteFile

Enclosing class:
  TdApi

public static final class TdApi.RemoteFile extends TdApi.Object
Represents a remote file.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CONSTRUCTOR`
`String`
`id`
Remote file identifier; may be empty.
`boolean`
`isUploadingActive`
True, if the file is currently being uploaded (or a remote copy is being generated by some other means).
`boolean`
`isUploadingCompleted`
True, if a remote copy is fully available.
`String`
`uniqueId`
Unique file identifier; may be empty if unknown.
`int`
`uploadedSize`
Size of the remote available part of the file, in bytes; 0 if unknown.

## Constructor Summary

Constructors
Constructor
Description
`RemoteFile()`
Represents a remote file.
`RemoteFile(DataInput input)`
Represents a remote file.
`RemoteFile(String id, String uniqueId, boolean isUploadingActive, boolean isUploadingCompleted, int uploadedSize)`
Represents a remote file.

## 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.Object

`serialize, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### id

public String id
Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers. If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. If downloadFile is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the originalPath and "#url#" as the conversion string. Application must generate the file by downloading it to the specified location.

### uniqueId

public String uniqueId
Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time.

### isUploadingActive

public boolean isUploadingActive
True, if the file is currently being uploaded (or a remote copy is being generated by some other means).

### isUploadingCompleted

public boolean isUploadingCompleted
True, if a remote copy is fully available.

### uploadedSize

public int uploadedSize
Size of the remote available part of the file, in bytes; 0 if unknown.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### RemoteFile

public RemoteFile()
Represents a remote file.

### RemoteFile

public RemoteFile(String id, String uniqueId, boolean isUploadingActive, boolean isUploadingCompleted, int uploadedSize)
Represents a remote file.

Parameters:
  `id` - String Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers. If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. If downloadFile is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the originalPath and "#url#" as the conversion string. Application must generate the file by downloading it to the specified location.
  `uniqueId` - String Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time.
  `isUploadingActive` - boolean True, if the file is currently being uploaded (or a remote copy is being generated by some other means).
  `isUploadingCompleted` - boolean True, if a remote copy is fully available.
  `uploadedSize` - int Size of the remote available part of the file, in bytes; 0 if unknown.

### RemoteFile

public RemoteFile(DataInput input) throws IOException
Represents a remote file.

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`