Module tdlight.api
Package it.tdlight.jni

# Class TdApi.LocalFile

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

Enclosing class:
  TdApi

public static final class TdApi.LocalFile extends TdApi.Object
Represents a local file.

## Field Summary

Fields
Modifier and Type
Field
Description
`boolean`
`canBeDeleted`
True, if the file can be deleted.
`boolean`
`canBeDownloaded`
True, if it is possible to try to download or generate the file.
`static final int`
`CONSTRUCTOR`
`int`
`downloadedPrefixSize`
If isDownloadingCompleted is false, then only some prefix of the file starting from downloadOffset is ready to be read.
`int`
`downloadedSize`
Total downloaded file size, in bytes.
`int`
`downloadOffset`
Download will be started from this offset.
`boolean`
`isDownloadingActive`
True, if the file is currently being downloaded (or a local copy is being generated by some other means).
`boolean`
`isDownloadingCompleted`
True, if the local copy is fully available.
`String`
`path`
Local path to the locally available file part; may be empty.

## Constructor Summary

Constructors
Constructor
Description
`LocalFile()`
Represents a local file.
`LocalFile(DataInput input)`
Represents a local file.
`LocalFile(String path, boolean canBeDownloaded, boolean canBeDeleted, boolean isDownloadingActive, boolean isDownloadingCompleted, int downloadOffset, int downloadedPrefixSize, int downloadedSize)`
Represents a local 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

### path

public String path
Local path to the locally available file part; may be empty.

### canBeDownloaded

public boolean canBeDownloaded
True, if it is possible to try to download or generate the file.

### canBeDeleted

public boolean canBeDeleted
True, if the file can be deleted.

### isDownloadingActive

public boolean isDownloadingActive
True, if the file is currently being downloaded (or a local copy is being generated by some other means).

### isDownloadingCompleted

public boolean isDownloadingCompleted
True, if the local copy is fully available.

### downloadOffset

public int downloadOffset
Download will be started from this offset. downloadedPrefixSize is calculated from this offset.

### downloadedPrefixSize

public int downloadedPrefixSize
If isDownloadingCompleted is false, then only some prefix of the file starting from downloadOffset is ready to be read. downloadedPrefixSize is the size of that prefix in bytes.

### downloadedSize

public int downloadedSize
Total downloaded file size, in bytes. Can be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### LocalFile

public LocalFile()
Represents a local file.

### LocalFile

public LocalFile(String path, boolean canBeDownloaded, boolean canBeDeleted, boolean isDownloadingActive, boolean isDownloadingCompleted, int downloadOffset, int downloadedPrefixSize, int downloadedSize)
Represents a local file.

Parameters:
  `path` - String Local path to the locally available file part; may be empty.
  `canBeDownloaded` - boolean True, if it is possible to try to download or generate the file.
  `canBeDeleted` - boolean True, if the file can be deleted.
  `isDownloadingActive` - boolean True, if the file is currently being downloaded (or a local copy is being generated by some other means).
  `isDownloadingCompleted` - boolean True, if the local copy is fully available.
  `downloadOffset` - int Download will be started from this offset. downloadedPrefixSize is calculated from this offset.
  `downloadedPrefixSize` - int If isDownloadingCompleted is false, then only some prefix of the file starting from downloadOffset is ready to be read. downloadedPrefixSize is the size of that prefix in bytes.
  `downloadedSize` - int Total downloaded file size, in bytes. Can be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage.

### LocalFile

public LocalFile(DataInput input) throws IOException
Represents a local 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`