|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.data.Range
public class Range
Describes a range of bytes.
Field Summary | |
---|---|
static long |
INDEX_FIRST
Index for the first byte of an entity. |
static long |
INDEX_LAST
Index for the last byte of an entity. |
static long |
SIZE_MAX
Maximum size available from the index. |
Constructor Summary | |
---|---|
Range()
Default constructor defining a range starting on the first byte and with a maximum size, i.e. |
|
Range(long size)
Constructor defining a range starting on the first byte and with the given size. |
|
Range(long index,
long size)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object object)
|
long |
getIndex()
Returns the index from which to start the range. |
long |
getSize()
Returns the size of the range in number of bytes. |
boolean |
isIncluded(long position,
long totalSize)
Indicates if the given index is included in the range. |
void |
setIndex(long index)
Sets the index from which to start the range. |
void |
setSize(long size)
Sets the size of the range in number of bytes. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long INDEX_FIRST
public static final long INDEX_LAST
public static final long SIZE_MAX
Constructor Detail |
---|
public Range()
public Range(long size)
size
- Size of the range in number of bytes.public Range(long index, long size)
index
- Index from which to start the rangesize
- Size of the range in number of bytes.Method Detail |
---|
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public long getIndex()
INDEX_FIRST
(0), starting at the first
byte.
public long getSize()
public boolean isIncluded(long position, long totalSize)
position
- The position to test.totalSize
-
public void setIndex(long index)
INDEX_FIRST
(0), starting at the first byte
index
- The index from which to start the range.public void setSize(long size)
size
- The size of the range in number of bytes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |