public final class FileSlice
extends java.lang.Object
The fileIndex() refers to the index of the file (in the TorrentInfo).
To get the path and filename, use TorrentInfo.files(). The offset() is the byte offset in the
file where the range starts, and size() is the number of bytes this range is. The size + offset
will never be greater than the file size.
Implementation note: This class does not store internally a reference to the native swig
file_slice. This is because we are dealing with only three integral
values and we want to avoid keeping a reference to a memory in the native heap.
| Constructor and Description |
|---|
FileSlice(file_slice fs) |
| Modifier and Type | Method and Description |
|---|---|
int |
fileIndex()
The index of the file.
|
long |
offset()
The offset from the start of the file, in bytes.
|
long |
size()
The size of the window, in bytes.
|
java.lang.String |
toString() |
public FileSlice(file_slice fs)
fs - the native objectpublic int fileIndex()
public long offset()
public long size()
public java.lang.String toString()
toString in class java.lang.Object