public interface IFileRangeSpecification
Modifier and Type | Method and Description |
---|---|
long |
getEndPosition()
Get the end position of transfer range.
|
long |
getStartPosition()
Get the start position to start from.
|
long getStartPosition()
IRetrieveFileTransferContainerAdapter.sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID, IFileRangeSpecification, IFileTransferListener, java.util.Map)
will result in a
InvalidFileRangeSpecificationException
.IRetrieveFileTransferContainerAdapter.sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID, IFileRangeSpecification, IFileTransferListener, java.util.Map)
,
getEndPosition()
long getEndPosition()
getStartPosition()
then this range specification is invalid. If greater than or
equal to N (where N is length of the file in bytes), then the remaining part of the given file will
be downloaded. If both getStartPosition()
and getEndPosition()
are valid, then
the number of bytes downloaded will be (endPosition - startPosition) + 1
. So, for example:
For a fileLength = 20 startPosition = 10 endPosition = 19 bytesDownloaded = 10 startPosition = 0 endPosition = -1 bytesDownloaded = 20 startPosition = 5 endPosition = 3 invalid range startPosition = 5 endPosition = 6 bytesDownloaded = 2 startPosition = 5 endPosition = -1 bytesDownloaded = 15
IRetrieveFileTransferContainerAdapter.sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID, IFileRangeSpecification, IFileTransferListener, java.util.Map)
,
getStartPosition()