public class PageRange extends Object
For a page update operation, the page range can be up to 4 MB in size. For a page clear operation, the page range can be up to the value of the blob's full size.
Pages are aligned with 512-byte boundaries. When specifying a page range, the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, etc.
| Constructor and Description |
|---|
PageRange()
Default constructor.
|
PageRange(long start,
long end)
Creates a page range from the specified start and end byte offsets,
inclusive.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getEnd()
Gets the byte offset of the end of the page range within the blob,
inclusive.
|
long |
getLength()
Gets the size of the page range in bytes.
|
long |
getStart()
Gets the byte offset of the start of the page range within the blob,
inclusive.
|
PageRange |
setEnd(long end)
Sets the byte offset of the end of the page range within the blob,
inclusive.
|
PageRange |
setLength(long value)
Sets the length of the page range in bytes.
|
PageRange |
setStart(long start)
Sets the byte offset of the start of the page range within the blob,
inclusive.
|
public PageRange()
PageRange instance to be valid.public PageRange(long start,
long end)
Pages are aligned with 512-byte boundaries. When specifying a page range, the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, etc.
start - The beginning offset value in bytes for the page range,
inclusive.end - The ending offset value in bytes for the page range,
inclusive.public long getStart()
public PageRange setStart(long start)
Pages are aligned with 512-byte boundaries. When specifying a page range, the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, etc.
start - The beginning offset value in bytes for the page range,
inclusive.PageRange instance.public long getEnd()
public PageRange setEnd(long end)
Pages are aligned with 512-byte boundaries. When specifying a page range, the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, etc.
end - The ending offset value in bytes for the page range,
inclusive.PageRange instance.public long getLength()
public PageRange setLength(long value)
Pages are aligned with 512-byte boundaries. When specifying a page range, the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, etc.
value - The ending offset value in bytes for the page range,
inclusive.PageRange instance./**
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/