Package org.drinkless.tdlib
Class TdApi.ReadFilePart
- java.lang.Object
-
- org.drinkless.tdlib.TdApi.Object
-
- org.drinkless.tdlib.TdApi.Function
-
- org.drinkless.tdlib.TdApi.ReadFilePart
-
- Enclosing class:
- TdApi
public static class TdApi.ReadFilePart extends TdApi.Function
Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file.Returns
FilePart
-
-
Field Summary
Fields Modifier and Type Field Description static intCONSTRUCTORIdentifier uniquely determining type of the object.intcountNumber of bytes to read.intfileIdIdentifier of the file.intoffsetThe offset from which to read the file.
-
Constructor Summary
Constructors Constructor Description ReadFilePart()Default constructor for a function, which reads a part of a file from the TDLib file cache and returns read bytes.ReadFilePart(int fileId, int offset, int count)Creates a function, which reads a part of a file from the TDLib file cache and returns read bytes.
-
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. The file must be located in the TDLib file cache.
-
offset
public int offset
The offset from which to read the file.
-
count
public int count
Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position.
-
CONSTRUCTOR
public static final int CONSTRUCTOR
Identifier uniquely determining type of the object.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ReadFilePart
public ReadFilePart()
Default constructor for a function, which reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file.Returns
FilePart
-
ReadFilePart
public ReadFilePart(int fileId, int offset, int count)Creates a function, which reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file.Returns
FilePart- Parameters:
fileId- Identifier of the file. The file must be located in the TDLib file cache.offset- The offset from which to read the file.count- Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position.
-
-
Method Detail
-
getConstructor
public int getConstructor()
- Specified by:
getConstructorin classTdApi.Object- Returns:
- this.CONSTRUCTOR
-
-