Class Range
java.lang.Object
org.jivesoftware.smackx.jingle_filetransfer.element.Range
- All Implemented Interfaces:
Element
,NamedElement
,XmlElement
,XmlLangElement
RangeElement which specifies, which range of a file shall be transferred.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRange()
Create a Range element with default values.Range
(int length) Create a Range element with specified length.Range
(int offset, int length) Create a Range element with specified offset and length.Range
(Integer offset, Integer length, HashElement hash) Create a Range element with specified offset, length and hash. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the root element name.getHash()
Return the hash element that contains a checksum of the bytes specified in the range.int
Return the length of the range.Returns the root element XML namespace.int
Return the index of the offset.int
hashCode()
toXML
(XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
Field Details
-
ELEMENT
- See Also:
-
NAMESPACE
- See Also:
-
ATTR_OFFSET
- See Also:
-
ATTR_LENGTH
- See Also:
-
-
Constructor Details
-
Range
public Range()Create a Range element with default values. -
Range
Create a Range element with specified length.- Parameters:
length
- length of the transmitted data in bytes.
-
Range
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
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
Return the index of the offset. This marks the begin of the specified range.- Returns:
- offset TODO javadoc me please
-
getLength
Return the length of the range.- Returns:
- length TODO javadoc me please
-
getHash
Return the hash element that contains a checksum of the bytes specified in the range.- Returns:
- hash element
-
getElementName
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
Description copied from interface:XmlElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceXmlElement
- Returns:
- the namespace.
-
toXML
-
equals
-
hashCode
-