| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| DataSource.java | ||
| DataSourceException.java | ||
| DataSpec.java | ||
| HttpDataSource.java | ||
| TransferListener.java | ||
| package-info.java |
This is a preliminary step toward adding a DataSpec.Builder,
which is needed for sanity when adding DataSpec.customData.
The existing absoluteStreamPosition field is very error prone,
because anyone using a Builder to adjust the request position
will need to remember to adjust two values:
dataSpec
.buildUpon()
.setAbsoluteStreamPosition(x)
.setPosition(x)
.build();
Furthermore, the difference between position and
absoluteStreamPosition is irrelevant in nearly all cases. In
the core library, the difference is only relevant when initializing
AES encryption/decryption to write/read cache files.
Replacing absoluteStreamPosition with uriPositionOffset will
simplify the code block above to:
dataSpec
.buildUpon()
.setPosition(x)
.build();
PiperOrigin-RevId: 294485644
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| DataSource.java | Loading commit data... | |
| DataSourceException.java | Loading commit data... | |
| DataSpec.java | Loading commit data... | |
| HttpDataSource.java | Loading commit data... | |
| TransferListener.java | Loading commit data... | |
| package-info.java | Loading commit data... |