K - The type of the representation key object.public abstract class SegmentDownloadAction<K extends java.lang.Comparable<K>> extends DownloadAction
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SegmentDownloadAction.SegmentDownloadActionDeserializer<K>
Base class for
SegmentDownloadAction Deserializers. |
DownloadAction.Deserializer| Modifier and Type | Field and Description |
|---|---|
java.util.List<K> |
keys |
data, isRemoveAction, type, uri, version| Modifier | Constructor and Description |
|---|---|
protected |
SegmentDownloadAction(java.lang.String type,
int version,
android.net.Uri uri,
boolean isRemoveAction,
byte[] data,
java.util.List<K> keys) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
protected abstract void |
writeKey(java.io.DataOutputStream output,
K key)
Serializes the
key into the output. |
void |
writeToStream(java.io.DataOutputStream output)
Serializes itself into the
output. |
createDownloader, deserializeFromStream, isSameMedia, serializeToStream, toByteArrayprotected SegmentDownloadAction(java.lang.String type,
int version,
android.net.Uri uri,
boolean isRemoveAction,
@Nullable
byte[] data,
java.util.List<K> 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 final void writeToStream(java.io.DataOutputStream output)
throws java.io.IOException
DownloadActionoutput.writeToStream in class DownloadActionjava.io.IOExceptionprotected abstract void writeKey(java.io.DataOutputStream output,
K key)
throws java.io.IOException
key into the output.java.io.IOExceptionpublic boolean equals(@Nullable
java.lang.Object o)
equals in class DownloadActionpublic int hashCode()
hashCode in class DownloadAction