[FEATURE REQ] StorageSeekableByteChannel
#32014
Labels
Storage
Storage Service (Queues, Blobs, Files)
StorageSeekableByteChannel
#32014
Is your feature request related to a problem? Please describe.
StorageInputStream
currently provides a low-memory-footprint mechanism to provide a seekable view of bytes in a Storage resource viamark(int)
andreset()
. Unfortunately, mark() is limited to max int, whereas long values are fully supportable in this situation.Further, azure-storage-blob-nio must support a
SeekableByteChannel
. It currently depends onStorageInputStream
as an implementation, and so is subject to those same limits, despite the API of the class suggesting it should not be. To support long-value seeking, blob nio must implement its ownSeekableByteChannel
, but it would be best to have this implementation in the main storage packages.Describe the solution you'd like
azure-storage-common transition its
StorageInputStream
andStorageOutputStream
implementations to aStorageSeekableByteChannel
implementation, leaving the old classes as facade over the new channel class. Service packages adopt their implementations appropriately. Channels could only be opened in read mode or write mode (something Java implementations are fine doing).Describe alternatives you've considered
Alternatives aren't viable as the limitation is in the mark/reset API from Java.
Additional context
Need prompted by #31924
Progress
The text was updated successfully, but these errors were encountered: