Class SIFileTransferOffer.SIRange

  • All Implemented Interfaces:
    Range
    Enclosing class:
    SIFileTransferOffer

    public static final class SIFileTransferOffer.SIRange
    extends Object
    implements Range
    Allows to do ranged transfers.
    • Constructor Detail

      • SIRange

        public SIRange​(long offset,
                       long length)
        Parameters:
        offset - Specifies the position, in bytes, to start transferring the file data from. This defaults to zero (0) if not specified.
        length - Specifies the number of bytes to retrieve starting at offset. This defaults to the length of the file from offset to the end.
    • Method Detail

      • getOffset

        public final long getOffset()
        Gets the position, in bytes, to start transferring the file data from. This defaults to zero (0) if not specified.
        Specified by:
        getOffset in interface Range
        Returns:
        The offset.
      • getLength

        public final long getLength()
        Gets the number of bytes to retrieve starting at offset. This defaults to the length of the file from offset to the end.
        Specified by:
        getLength in interface Range
        Returns:
        The length.