Package ch.tocco.nice2.dms.impl.publish
Class Range
java.lang.Object
ch.tocco.nice2.dms.impl.publish.Range
Utility class for Range header values. See http://tools.ietf.org/html/rfc2616#section-14.35
-
Method Summary
Modifier and TypeMethodDescriptionabstract intfirstPos(int totalLength) fromEnumeration(Enumeration headerValue) static RangefromStart(int firstPos) fromString(String headerValue) Creates a `Range` object from a header value like "bytes=100-300".static Rangelastbytes(int suffix) abstract intlastPos(int totalLength) static Rangerange(int firstPos, int lastPos) intrangeLength(int completeLength) toHeaderValue(int totalLength)
-
Method Details
-
rangeLength
public int rangeLength(int completeLength) -
toHeaderValue
-
firstPos
public abstract int firstPos(int totalLength) -
lastPos
public abstract int lastPos(int totalLength) -
range
-
fromStart
-
lastbytes
-
fromEnumeration
-
fromString
Creates a `Range` object from a header value like "bytes=100-300".
-