Package org.fcrepo.http.commons.domain
Class Range
- java.lang.Object
-
- org.fcrepo.http.commons.domain.Range
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRange.RangeOfLengthRepresents a range object based on length
-
Constructor Summary
Constructors Modifier Constructor Description protectedRange(long start)Left-bounded range
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Rangeconvert(String source)Convert an HTTP Range header to a Range objectprotected longend()End of the rangeprotected booleanhasRange()Does this range actually impose limitsRange.RangeOfLengthrangeOfLength(long length)Create a range object with start and end bytes based on the length of the content.protected longsize()Length contained in the rangeprotected longstart()Start of the range
-
-
-
Constructor Detail
-
Range
protected Range(long start)
Left-bounded range- Parameters:
start- the start
-
-
Method Detail
-
hasRange
protected boolean hasRange()
Does this range actually impose limits- Returns:
- true if the range imposes limits
-
size
protected long size()
Length contained in the range- Returns:
- length of the range
-
start
protected long start()
Start of the range- Returns:
- start of the range, or -1 if no start was specified
-
end
protected long end()
End of the range- Returns:
- end of the range
-
convert
public static Range convert(String source)
Convert an HTTP Range header to a Range object- Parameters:
source- the source- Returns:
- range object
-
rangeOfLength
public Range.RangeOfLength rangeOfLength(long length)
Create a range object with start and end bytes based on the length of the content.- Parameters:
length- the length of the content- Returns:
- a range of length object
-
-