com.google.gdata.data.media
Class MediaByteArraySource
java.lang.Object
com.google.gdata.data.media.BaseMediaSource
com.google.gdata.data.media.MediaByteArraySource
- All Implemented Interfaces:
- MediaSource, javax.activation.DataSource
public class MediaByteArraySource
- extends BaseMediaSource
The MediaByteArraySource class provides a basic implementation of the
MediaSource
interface that reads media data from an in-memory
byte array. The content length of the media source defaults to the size
of the byte array and the time of modification to the current time.
- See Also:
MediaSource
Constructor Summary |
MediaByteArraySource(byte[] mediaBytes,
java.lang.String mediaType)
Constructs a new MediaBteyArraySource using the specified byte data
and content type. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MediaByteArraySource
public MediaByteArraySource(byte[] mediaBytes,
java.lang.String mediaType)
- Constructs a new MediaBteyArraySource using the specified byte data
and content type.
getInputStream
public java.io.InputStream getInputStream()
getOutputStream
public java.io.OutputStream getOutputStream()