public class Range
extends java.lang.Object
implements org.jivesoftware.smack.packet.FullyQualifiedElement
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_LENGTH |
static java.lang.String |
ATTR_OFFSET |
static java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
| Constructor and Description |
|---|
Range()
Create a Range element with default values.
|
Range(int length)
Create a Range element with specified length.
|
Range(java.lang.Integer offset,
java.lang.Integer length,
HashElement hash)
Create a Range element with specified offset, length and hash.
|
Range(int offset,
int length)
Create a Range element with specified offset and length.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getElementName() |
HashElement |
getHash()
Return the hash element that contains a checksum of the bytes specified in the range.
|
int |
getLength()
Return the length of the range.
|
java.lang.String |
getNamespace() |
int |
getOffset()
Return the index of the offset.
|
int |
hashCode() |
java.lang.CharSequence |
toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitpublic static final java.lang.String ELEMENT
public static final java.lang.String NAMESPACE
public static final java.lang.String ATTR_OFFSET
public static final java.lang.String ATTR_LENGTH
public Range()
public Range(int length)
length - length of the transmitted data in bytes.public Range(int offset,
int length)
offset - offset in bytes from the beginning of the transmitted data.length - number of bytes that shall be transferred.public Range(java.lang.Integer offset,
java.lang.Integer length,
HashElement hash)
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.public int getOffset()
public int getLength()
public HashElement getHash()
public java.lang.String getElementName()
getElementName in interface org.jivesoftware.smack.packet.NamedElementpublic java.lang.String getNamespace()
getNamespace in interface org.jivesoftware.smack.packet.FullyQualifiedElementpublic java.lang.CharSequence toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
toXML in interface org.jivesoftware.smack.packet.Elementpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object