public class MediaContent
extends com.google.api.client.http.AbstractInputStreamContent
| Constructor and Description |
|---|
MediaContent(java.lang.String type,
java.io.File file)
Instantiates a new Media content.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
getFile()
Gets file.
|
java.io.InputStream |
getInputStream() |
long |
getLength() |
boolean |
retrySupported() |
void |
setUploadProgressListener(NetworkProgressListener networkProgressListener)
Sets upload progress listener.
|
public MediaContent(java.lang.String type,
java.io.File file)
throws java.io.FileNotFoundException
type - Content type or
for nonefile - filejava.io.FileNotFoundException - the file not found exceptionpublic void setUploadProgressListener(NetworkProgressListener networkProgressListener)
networkProgressListener - the upload progress listenerpublic long getLength()
public boolean retrySupported()
public java.io.InputStream getInputStream()
throws java.io.FileNotFoundException
getInputStream in class com.google.api.client.http.AbstractInputStreamContentjava.io.FileNotFoundExceptionpublic java.io.File getFile()