public abstract class SegmentDownloadAction extends DownloadAction
Modifier and Type | Class and Description |
---|---|
protected static class |
SegmentDownloadAction.SegmentDownloadActionDeserializer
Base class for
SegmentDownloadAction Deserializer s. |
DownloadAction.Deserializer
Modifier and Type | Field and Description |
---|---|
List<StreamKey> |
keys |
data, isRemoveAction, type, uri, version
Modifier | Constructor and Description |
---|---|
protected |
SegmentDownloadAction(String type,
int version,
Uri uri,
boolean isRemoveAction,
byte[] data,
List<StreamKey> keys) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List<StreamKey> |
getKeys()
Returns keys of tracks to be downloaded.
|
int |
hashCode() |
void |
writeToStream(DataOutputStream output)
Serializes itself into the
output . |
createDownloader, deserializeFromStream, getDefaultDeserializers, isSameMedia, serializeToStream, toByteArray
protected SegmentDownloadAction(String type, int version, Uri uri, boolean isRemoveAction, @Nullable byte[] data, List<StreamKey> keys)
type
- The type of the action.version
- The action version.uri
- The URI of the media being downloaded.isRemoveAction
- Whether the data will be removed. If false
it will be downloaded.data
- Optional custom data for this action. If null
an empty array will be used.keys
- Keys of tracks to be downloaded. If empty, all tracks will be downloaded. If removeAction
is true, keys
must be empty.public List<StreamKey> getKeys()
DownloadAction
getKeys
in class DownloadAction
public final void writeToStream(DataOutputStream output) throws IOException
DownloadAction
output
.writeToStream
in class DownloadAction
IOException
public boolean equals(@Nullable Object o)
equals
in class DownloadAction
public int hashCode()
hashCode
in class DownloadAction