public class S3RangeSpec extends Object
Modifier and Type | Class and Description |
---|---|
static class |
S3RangeSpec.Factory
Factory for
S3RangeSpec . |
Modifier and Type | Field and Description |
---|---|
static S3RangeSpec |
INVALID_S3_RANGE_SPEC |
Modifier | Constructor and Description |
---|---|
protected |
S3RangeSpec(boolean isValid) |
|
S3RangeSpec(long start,
long end) |
Modifier and Type | Method and Description |
---|---|
long |
getLength(long objectSize)
Get real length of object.
|
long |
getOffset(long objectSize)
Get real offset of object.
|
String |
getRealRange(long objectSize)
Get real range of response.
|
boolean |
isValid() |
public static final S3RangeSpec INVALID_S3_RANGE_SPEC
protected S3RangeSpec(boolean isValid)
isValid
- the spec is valid or notpublic S3RangeSpec(long start, long end)
start
- the start offset of objectend
- the end offset of objectpublic long getLength(long objectSize)
objectSize
- the object sizepublic long getOffset(long objectSize)
objectSize
- the object sizepublic String getRealRange(long objectSize)
objectSize
- the object sizepublic boolean isValid()
Copyright © 2023. All Rights Reserved.