public class

MediaContent

extends AbstractInputStreamContent
java.lang.Object
   ↳ com.google.api.client.http.AbstractInputStreamContent
     ↳ fm.audiobox.core.utils.MediaContent

Class Overview

A wrapper content type for MediaFile. Used for upload purpose.

Summary

Public Constructors
MediaContent(String type, File file)
Instantiates a new Media content.
Public Methods
File getFile()
Gets file.
InputStream getInputStream()
long getLength()
boolean retrySupported()
void setUploadProgressListener(NetworkProgressListener networkProgressListener)
Sets upload progress listener.
[Expand]
Inherited Methods
From class com.google.api.client.http.AbstractInputStreamContent
From class java.lang.Object
From interface com.google.api.client.http.HttpContent
From interface com.google.api.client.util.StreamingContent

Public Constructors

public MediaContent (String type, File file)

Instantiates a new Media content.

Parameters
type Content type or for none
file file
Throws
FileNotFoundException the file not found exception

Public Methods

public File getFile ()

Gets file.

Returns
  • the file

public InputStream getInputStream ()

Throws
FileNotFoundException

public long getLength ()

public boolean retrySupported ()

public void setUploadProgressListener (NetworkProgressListener networkProgressListener)

Sets upload progress listener.

Parameters
networkProgressListener the upload progress listener