Class RangeResponse
java.lang.Object
com.atlassian.jira.web.servlet.viewfile.RangeResponse
Represents a partial range of bytes to be returned in a partial HTTP request.
- Since:
- v7.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCalculates the "Content-Length" response header value.Calculates the "Content-Range" response header value.inttoString()
-
Constructor Details
-
RangeResponse
-
-
Method Details
-
getStartIndex
public int getStartIndex() -
getEndIndex
-
calculateContentLength
public int calculateContentLength()Calculates the "Content-Length" response header value.That is, the number of bytes we will return, based on the requested range and also the actual length of the file. See https://tools.ietf.org/html/rfc7233#section-4.1
- Returns:
- the number of bytes we will return for this range.
-
calculateContentRange
Calculates the "Content-Range" response header value.eg "Content-Range: bytes 21010-47021/47022" See https://tools.ietf.org/html/rfc7233#section-4.1
- Returns:
- the number of bytes we will return for this range.
-
toString
-