Package com.google.cloud.storage
Class ReadAsSeekableChannel
java.lang.Object
com.google.cloud.storage.ReadProjectionConfig<SeekableByteChannel>
com.google.cloud.storage.ReadAsSeekableChannel
@BetaApi
@Immutable
public final class ReadAsSeekableChannel
extends ReadProjectionConfig<SeekableByteChannel>
Read from the object as a
SeekableByteChannel
The returned channel will be non-blocking for all read calls. If bytes have not yet asynchronously been delivered from Google Cloud Storage the method will return rather than waiting for the bytes to arrive.
The resulting SeekableByteChannel MUST be close()ed to avoid leaking memory
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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanGet theRangeSpecFunctionthis instance will use to generateRangeSpecs for reading from an object.inthashCode()toString()withRangeSpecFunction(RangeSpecFunction rangeSpecFunction) Return an instance with therangeSpecFunctionset to the specified value.
-
Method Details
-
getRangeSpecFunction
Get theRangeSpecFunctionthis instance will use to generateRangeSpecs for reading from an object.- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
-
withRangeSpecFunction
Return an instance with therangeSpecFunctionset to the specified value.- Parameters:
rangeSpecFunction- TheRangeSpecFunctionto use to generateRangeSpecs for reading from an object.- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-