Package com.google.cloud.storage
Class MaxLengthRangeSpecFunction
java.lang.Object
com.google.cloud.storage.RangeSpecFunction
com.google.cloud.storage.MaxLengthRangeSpecFunction
Produce a new
RangeSpec relative to the provided offset and prev, where
the RangeSpec will have a maxLength set to the lesser of prev.maxLength and
this.maxLength.
Instances of this class are immutable and thread safe.
- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanlongThe maximum maxLength for any RangeSpec returned fromapply(long, RangeSpec)inthashCode()toString()withMaxLength(long maxLength) Return an instance with themaxLengthset to the specified value.Methods inherited from class com.google.cloud.storage.RangeSpecFunction
andThen, linearExponential, maxLength
-
Method Details
-
getMaxLength
public long getMaxLength()The maximum maxLength for any RangeSpec returned fromapply(long, RangeSpec)Default:
0-- no max length- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
withMaxLength
Return an instance with themaxLengthset to the specified value.Default:
0-- no max length- Parameters:
maxLength- The number of bytes aRangeSpecs maxLength should be limited to. Must be >0.- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-