public class Media extends BaseModelObject
/v1/users/{userId}/mediaclient, dateFormat, parentUri, properties| Constructor and Description |
|---|
Media(BandwidthRestClient client,
String parentUri) |
| Modifier and Type | Method and Description |
|---|---|
void |
download(String mediaName,
File file)
Downloads existing media file from server.
|
List<MediaFile> |
getMediaFiles()
Gets a list of your media files.
|
protected String |
getUri() |
MediaFile |
upload(String mediaName,
File file,
String contentType)
Uploads media file.
|
getId, getProperty, getPropertyAsBoolean, getPropertyAsDate, getPropertyAsDouble, getPropertyAsLong, getPropertyAsString, getPropertyAsStringArray, putProperty, toMap, updatePropertiespublic Media(BandwidthRestClient client, String parentUri)
public List<MediaFile> getMediaFiles() throws IOException
IOExceptionpublic MediaFile upload(String mediaName, File file, String contentType) throws IOException
mediaName - new name of media filefile - source file for uploadingcontentType - MIME type of file or nullIOExceptionpublic void download(String mediaName, File file) throws IOException
mediaName - name of mediafile - file for putting content. Will be overridden.IOExceptionprotected String getUri()
getUri in class BaseModelObjectCopyright © 2014. All rights reserved.