- Enclosing class:
- TdApi
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
Modifier and TypeFieldDescriptionstatic final int
long
Number of bytes to read.int
Identifier of the file.long
The offset from which to read the file. -
Constructor Summary
ConstructorDescriptionReads a part of a file from the TDLib file cache and returns read bytes.ReadFilePart
(int fileId, long offset, long count) Reads a part of a file from the TDLib file cache and returns read bytes.ReadFilePart
(DataInput input) Reads a part of a file from the TDLib file cache and returns read bytes. -
Method Summary
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. The file must be located in the TDLib file cache. -
offset
public long offsetThe offset from which to read the file. -
count
public long countNumber 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- See Also:
-
-
Constructor Details
-
ReadFilePart
public ReadFilePart()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. ReturnsFilePart
-
ReadFilePart
public ReadFilePart(int fileId, long offset, long count) 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. ReturnsFilePart
- Parameters:
fileId
- int Identifier of the file. The file must be located in the TDLib file cache.offset
- long The offset from which to read the file.count
- long 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.
-
ReadFilePart
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. ReturnsFilePart
- 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()
-