rohks 004b9d69fd Handle case where length is unset in FileDescriptorDataSource
- Modified the logic of `open()` and `read()` methods to handle scenarios where length is unset for the `FileDescriptor` provided.
- Added unit test and contract test to handle this case.

Also used `getDeclaredLength()` instead of `getLength()` to set the length of `AssetFileDescriptor` in unit tests and contract tests.

PiperOrigin-RevId: 657551343
2024-07-30 05:29:05 -07:00
..
2021-10-27 09:12:46 +01:00

DataSource module

Provides a DataSource abstraction and a number of concrete implementations for reading data from different sources. Application code will not normally need to depend on this module directly.