Click or drag to resize
GetObjectRequestSetRange Method
Sets the read range of the target object (optional). It follows the HTTP header "Range"'s semantic

Namespace: Aliyun.OSS
Assembly: Aliyun.OSS (in Aliyun.OSS.dll) Version: 2.8.0.0 (2.8.0)
Syntax
public void SetRange(
	long start,
	long end
)

Parameters

start
Type: SystemInt64
The start value in the range.

If the value is non-negative, it means the start index of the object to read. If the value is -1, it means the start index is determined by end parameter and thus the end parameter must not be -1. For example, if the end is 100, then the start is bytes=-100 (bytes is the total length of the object). It means to read the last 100 bytes of the object.

end
Type: SystemInt64
The end value of the range. And it must be smaller than the total length of the object.

If the value is non-negative, it means the end index of the object to read. If the value is -1, it means the end is the object's last byte and start must not be -1. For example, if the start is 99 and end is -1, it means to read the whole object except the first 99 bytes.

See Also