Class ByteRange
java.lang.Object
edu.ucsb.nceas.metacat.restservice.ByteRange
This class parses the byte range header in the https requests
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEnd()Get the end value of the rangelonggetStart()Get the start value of the rangestatic ByteRangeparseRange(javax.servlet.http.HttpServletRequest request) Parse the http request to get the byte range
-
Constructor Details
-
ByteRange
Constructor- Parameters:
start- the start of the byte rangeend- the end of the byte range. Null means open-ended
-
-
Method Details
-
getStart
public long getStart()Get the start value of the range- Returns:
- the start value of the range
-
getEnd
Get the end value of the range- Returns:
- the end value of the range. Null means open-ended.
-
parseRange
public static ByteRange parseRange(javax.servlet.http.HttpServletRequest request) throws org.dataone.service.exceptions.InvalidRequest Parse the http request to get the byte range- Parameters:
request- the request needs to be parsed- Returns:
- the byte range in the request. Null will be returned if there is no range specified
- Throws:
org.dataone.service.exceptions.InvalidRequest
-