Google Data APIs Client Library (1.41.1)
com.google.gdata.data.media
Class MediaFileSource
java.lang.Object
com.google.gdata.data.media.BaseMediaSource
com.google.gdata.data.media.MediaFileSource
- All Implemented Interfaces:
- MediaSource, javax.activation.DataSource
public class MediaFileSource
- extends BaseMediaSource
The MediaFileSource class provides a basic implementation of the
MediaSource
interface that reads media data from a File
.
The content length will be initialized to the file length, the last
modified time to the file modification time, and the name of the source
will be the name (last path element) of the file.
- See Also:
MediaSource
Constructor Summary |
MediaFileSource(java.io.File mediaFile,
java.lang.String mediaType)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MediaFileSource
public MediaFileSource(java.io.File mediaFile,
java.lang.String mediaType)
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Throws:
java.io.IOException
getOutputStream
public java.io.OutputStream getOutputStream()
getMediaFile
public java.io.File getMediaFile()