Class ReadProjectionConfigs
ReadProjectionConfigs.
There are multiple projections which can be used to access the content of a BlobInfo
in Google Cloud Storage.
- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReadAsChannelRead a range as a non-blockingScatteringByteChannel.static ReadAsFutureBytesRead a range ofbytes as anApiFuture<byte[]>static ReadAsFutureByteStringstatic ReadAsSeekableChannelRead from the object as aSeekableByteChannel
-
Method Details
-
asChannel
Read a range as a non-blockingScatteringByteChannel.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
ScatteringByteChannelMUST beclose()ed to avoid leaking memory- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
asFutureBytes
Read a range ofbytes as anApiFuture<byte[]>The entire range will be accumulated in memory before the future will resolve.
If you do not want the entire range accumulated in memory, please use one of the other
ReadProjectionConfigs available.- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
ApiFuture
-
asFutureByteString
Read a range ofbytes as anApiFuture<ZeroCopySupport.DisposableByteString>The resulting
ZeroCopySupport.DisposableByteStringMUST beclose()ed to avoid leaking memoryThe entire range will be accumulated in memory before the future will resolve.
If you do not want the entire range accumulated in memory, please use one of the other
ReadProjectionConfigs available.- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
ApiFutureByteString
-
asSeekableChannel
Read from the object as aSeekableByteChannelThe 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
SeekableByteChannelMUST beclose()ed to avoid leaking memory- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
- See Also:
-