Chains multiple streams in single stream, sort of what
itertools.chaindoes for iterators.
Cleans up buffers of underlying streams when closed.
Can be seeked to beginning (when retrying upload, for example). Closes underlying streams as soon as they reaches EOF, but clears their buffers when the chained stream is closed for underlying streams that follow
b2sdk.v1.StreamOpenercleanup interface, for example
stream_openeres (list) – list of callables that return opened streams
Return currently processed stream.
Return whether object supports random access.
If False, seek(), tell() and truncate() will raise OSError. This method may need to do a test seek().
Return current stream position.
Resets stream to the beginning.
Return whether object was opened for reading.
If False, read() will raise OSError.
Read data from the stream.
Flush and close the IO object.
This method has no effect if the file is already closed.
Abstract class to define stream opener with cleanup.
Clean up stream opener after chained stream closes.
Can be used for cleaning cached data that are stored in memory to allow resetting chained stream without getting this data more than once, eg. data downloaded from external source.