Interface BlobReadSession (2.53.0)

public interface BlobReadSession extends AutoCloseable, Closeable

A session for reading bytes from a Blob See Also: Storage#blobReadSession(BlobId, BlobSourceOption...), ReadProjectionConfigs

Implements

AutoCloseable, Closeable

Methods

readAs(ReadProjectionConfig config)

public abstract Projection <Projection>readAs(ReadProjectionConfig config)

Read from this session as a specific Projection as dictated by the provided config See Also: ReadProjectionConfigs, ReadProjectionConfig

Parameter
Name Description
config ReadProjectionConfig<Projection>
Returns
Type Description
Projection

close()

public abstract void close()

Close this session and any Projections produced by #readAs(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.

Exceptions
Type Description
IOException

getBlobInfo()

public abstract BlobInfo getBlobInfo()

The resolved metadata for the object being read

Returns
Type Description
BlobInfo