Package com.oracle.bmc.model
Class Range
- java.lang.Object
-
- com.oracle.bmc.model.Range
-
public class Range extends Object
Class specifying a range-request is being made.Request mostly follows https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35, except only one range is allowed. For the purposes of the SDK, three types of requests are supported:
- Exact range (0-100): All bytes in the given range
- Starts-at (100-): All bytes >= the start byte
- Last (-100): The last X bytes
Also used to represent the range returned by the server (including the full content length, if known).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
getContentLength()
The content length as returned by the server, or null if unknown.Long
getEndByte()
The end byte, if given.Long
getStartByte()
The start byte, if given.static Range
parse(String value)
Parse the “content-range” header per https://tools.ietf.org/html/rfc7233#section-4.2.String
toString()
-
-
-
Constructor Detail
-
Range
@ConstructorProperties({"startByte","endByte"}) public Range(Long startByte, Long endByte)
-
-
Method Detail
-
parse
public static Range parse(String value)
Parse the “content-range” header per https://tools.ietf.org/html/rfc7233#section-4.2.Note, this is only for successful responses (206). It does not handle 416 (range not satisfiable).
- Parameters:
value
- The response header value.- Returns:
- A new Range header.
-
getStartByte
public Long getStartByte()
The start byte, if given.
-
getEndByte
public Long getEndByte()
The end byte, if given.
-
getContentLength
public Long getContentLength()
The content length as returned by the server, or null if unknown.
-
-