public class Range
extends java.lang.Object
implements org.jivesoftware.smack.packet.NamedElement
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_LENGTH |
static java.lang.String |
ATTR_OFFSET |
static java.lang.String |
ELEMENT |
| Constructor and Description |
|---|
Range()
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(int offset,
int length,
HashElement hash)
Create a Range element with specified offset, length and hash.
|
| 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.
|
int |
getOffset()
Return the index of the offset.
|
int |
hashCode() |
java.lang.CharSequence |
toXML(java.lang.String enclosingNamespace) |
public static final java.lang.String ELEMENT
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(int offset,
int 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.CharSequence toXML(java.lang.String 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