ContentRange
The ContentRange
class serves as a structure to store Information about the Response's Content-Range header.
INFO
The Content-Range header is usually provided for Partial Content 206 Responses. This means, the Content-Body received with the response is only part of the original full Content-Body. For example, if the desired content is only 128 bytes starting from the 32nd byte wherein the actual size of the content is 1024, the Content-Range may look like bytes 31-127/1024.
Fields
start
private long start
This defines where the content-range starts.
end
private long end
This defines where the content-range ends.
size
private long size
This defines the size of the original full Content-Body.
Methods
getStart()
public long getStart()
returns the value of start.
getEnd()
public long getEnd()
returns the value of end.
getSize()
public long getSize()
returns the value of size.
parse()
public static ContentRange parse(String range)
Converts the Content-Range header string straight to ContentRange.