-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to seek beyond end of stream (#192)
## Description of change This pull request adds support to seek beyond stream end. Since seek is done lazily this is the correct behaviour. It also adds closed checks to read operations. With this PR, we are reconciling S3SeekableStream behaviour with its' documentation. #### Relevant issues [Issue#83 ](#83) #### Does this contribution introduce any breaking changes to the existing APIs or behaviors? Yes. Seek will no longer Throw EOF exception when position to seek is > contentLength. #### Does this contribution introduce any new public APIs or behaviors? Yes, Seek to beyond stream end will no longer throw. Read/Seek operations on closed stream will throw. #### How was the contribution tested? Added new unit tests and property based tests. Removed %size from `seekChangesPosition` property tests to ensure validSizes can go beyond stream size. #### Does this contribution need a changelog entry? - [X] I have updated the CHANGELOG or README if appropriate --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the [Developer Certificate of Origin (DCO)](https://developercertificate.org/).
- Loading branch information
Showing
5 changed files
with
80 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters