Package com.google.cloud.storage
Interface BlobReadSession
- All Superinterfaces:
AutoCloseable,Closeable
@BetaApi
@InternalExtensionOnly
@TransportCompatibility(GRPC)
public interface BlobReadSession
extends AutoCloseable, Closeable
A session for reading bytes from a Blob
- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this session and anyProjections produced byreadAs(ReadProjectionConfig).The resolved metadata for the object being read<Projection>
ProjectionreadAs(ReadProjectionConfig<Projection> config) Read from this session as a specificProjectionas dictated by the providedconfig
-
Method Details
-
getBlobInfo
The resolved metadata for the object being read- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
-
readAs
@BetaApi @TransportCompatibility(GRPC) <Projection> Projection readAs(ReadProjectionConfig<Projection> config) Read from this session as a specificProjectionas dictated by the providedconfig- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
close
Close this session and anyProjections produced byreadAs(ReadProjectionConfig).If a projection is not fully consumed/resolved it will be transitioned to a failed state.
This method MUST be called to ensure cleanup of any inflight buffers, and to avoid a memory leak.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
-