Class ReadAsChannel

java.lang.Object
com.google.cloud.storage.ReadProjectionConfig<Projection>
com.google.cloud.storage.ReadAsChannel

@BetaApi @Immutable public final class ReadAsChannel extends ReadProjectionConfig<Projection>
Read a range of bytes as a non-blocking ScatteringByteChannel

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 ScatteringByteChannel 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: