public class MediaDownload
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MediaDownload.Constraints
Media Download resource constrains not to be exceeded.
|
static class |
MediaDownload.ContentBase
The download content parameters.
|
static class |
MediaDownload.ContentState
Content download states
|
static class |
MediaDownload.ContentStatus
The download content status.
|
static class |
MediaDownload.DashContent
MPEG DASH content parameters
|
static interface |
MediaDownload.Listener
The Media Download Listener interface.
|
static class |
MediaDownload.SingleFileContent
Single file parameters
|
static class |
MediaDownload.SourceType
The content source type.
|
static class |
MediaDownload.State
The overall Media Download status.
|
static class |
MediaDownload.Status
The Media Download status.
|
| Constructor and Description |
|---|
MediaDownload()
Obtain a Media Download singleton object reference.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContent(java.lang.String path,
MediaDownload.ContentBase content)
Register a new content for download.
|
void |
cancelContent(java.lang.String path)
Cancel the content from download.
|
void |
finalize()
Do release if necessary.
|
void |
pause()
Pause the Media Download.
|
MediaDownload.ContentStatus |
queryContentStatus(java.lang.String path)
Query the status of the content being downloaded.
|
MediaDownload.Status |
queryStatus()
Query the Media Download status.
|
void |
release()
Release a Media Download singleton reference.
|
void |
removeListener()
Remove the listener, if any.
|
void |
resume()
Resume the Media Download.
|
void |
setConstraints(MediaDownload.Constraints constraints)
Assign the Media Download constraints.
|
void |
setListener(MediaDownload.Listener listener)
Set the listener.
|
public MediaDownload()
throws ErrorCodeException
ErrorCodeExceptionpublic void release()
throws ErrorCodeException
ErrorCodeExceptionpublic void finalize()
finalize in class java.lang.Objectpublic void setListener(MediaDownload.Listener listener) throws ErrorCodeException, java.lang.NullPointerException
listener - pointer to the listener object that will be copied
by the MediaDownload#setListener() functionErrorCodeExceptionjava.lang.NullPointerExceptionpublic void removeListener()
throws ErrorCodeException
ErrorCodeExceptionpublic void pause()
throws ErrorCodeException
ErrorCodeExceptionpublic void resume()
throws ErrorCodeException
ErrorCodeExceptionpublic void setConstraints(MediaDownload.Constraints constraints) throws ErrorCodeException, java.lang.NullPointerException
constraints - the new constraints objectErrorCodeExceptionjava.lang.NullPointerExceptionpublic MediaDownload.Status queryStatus() throws ErrorCodeException
ErrorCodeExceptionpublic void addContent(java.lang.String path,
MediaDownload.ContentBase content)
throws ErrorCodeException,
java.lang.NullPointerException
path - the unique directory path to where the newly downloaded
content will be stored. The directory may or may not exist,
but the parent directory must exist. If the directory at
path does not exist, it is created.content - description of the content to be downloaded.ErrorCodeExceptionjava.lang.NullPointerExceptionpublic void cancelContent(java.lang.String path)
throws ErrorCodeException,
java.lang.NullPointerException
path - the unique directory path that identifies the
content being downloaded.ErrorCodeExceptionjava.lang.NullPointerExceptionpublic MediaDownload.ContentStatus queryContentStatus(java.lang.String path) throws ErrorCodeException, java.lang.NullPointerException
path - the unique directory path that identifies the content
being queriedErrorCodeExceptionjava.lang.NullPointerException