|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.noelios.restlet.util.RangeUtils
public class RangeUtils
Range manipulation utilities.
Constructor Summary | |
---|---|
RangeUtils()
|
Method Summary | |
---|---|
static java.lang.String |
formatContentRange(Range range,
long size)
Format range as a Content-Range header value |
static java.lang.String |
formatRanges(java.util.List<Range> ranges)
Format ranges as a Range header value |
static void |
parseContentRange(java.lang.String value,
Representation representation)
Parse the Content-Range header value and update the given representation. |
static java.util.List<Range> |
parseRangeHeader(java.lang.String rangeHeader)
Parse the Range header and returns the list of corresponding Range objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RangeUtils()
Method Detail |
---|
public static java.lang.String formatContentRange(Range range, long size) throws java.lang.Exception
range
as a Content-Range header value
range
- Range to formatsize
- Total size of the entity
range
formatted
java.lang.Exception
public static java.lang.String formatRanges(java.util.List<Range> ranges)
ranges
as a Range header value
ranges
- List of ranges to format
ranges
formatted or null if the list is null or empty.public static void parseContentRange(java.lang.String value, Representation representation)
value
- Content-range header.representation
- Representation to update.public static java.util.List<Range> parseRangeHeader(java.lang.String rangeHeader)
rangeHeader
- The Range header value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |