java.lang.Object
org.jivesoftware.smackx.jingle_filetransfer.element.Range
All Implemented Interfaces:
org.jivesoftware.smack.packet.Element, org.jivesoftware.smack.packet.NamedElement, org.jivesoftware.smack.packet.XmlElement, org.jivesoftware.smack.packet.XmlLangElement

public class Range extends Object implements org.jivesoftware.smack.packet.XmlElement
RangeElement which specifies, which range of a file shall be transferred.
  • Field Details

  • Constructor Details

    • Range

      public Range()
      Create a Range element with default values.
    • Range

      public Range(int length)
      Create a Range element with specified length.
      Parameters:
      length - length of the transmitted data in bytes.
    • Range

      public Range(int offset, int length)
      Create a Range element with specified offset and length.
      Parameters:
      offset - offset in bytes from the beginning of the transmitted data.
      length - number of bytes that shall be transferred.
    • Range

      public Range(Integer offset, Integer length, HashElement hash)
      Create a Range element with specified offset, length and hash.
      Parameters:
      offset - offset in bytes from the beginning of the transmitted data.
      length - number of bytes that shall be transferred.
      hash - hash of the bytes in the specified range.
  • Method Details

    • getOffset

      public int getOffset()
      Return the index of the offset. This marks the begin of the specified range.
      Returns:
      offset TODO javadoc me please
    • getLength

      public int getLength()
      Return the length of the range.
      Returns:
      length TODO javadoc me please
    • getHash

      public HashElement getHash()
      Return the hash element that contains a checksum of the bytes specified in the range.
      Returns:
      hash element
    • getElementName

      public String getElementName()
      Specified by:
      getElementName in interface org.jivesoftware.smack.packet.NamedElement
    • getNamespace

      public String getNamespace()
      Specified by:
      getNamespace in interface org.jivesoftware.smack.packet.XmlElement
    • toXML

      public CharSequence toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
      Specified by:
      toXML in interface org.jivesoftware.smack.packet.Element
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object