public abstract class

BaseMediaSource

extends Object
implements MediaSource
java.lang.Object
   ↳ com.google.gdata.data.media.BaseMediaSource
Known Direct Subclasses

Class Overview

The BaseMediaSource class provides an abstract base class implementation of the MediaSource interface.

See Also

Summary

Fields
protected long contentLength
protected String etag
protected DateTime lastModified
protected final String mediaType
protected String name
Protected Constructors
BaseMediaSource(String mediaType)
Constructs a new BaseMediaSource of the specified content type.
Public Methods
long getContentLength()
Returns the length (in bytes) of the media source.
String getContentType()
String getEtag()
Returns the entity tag (etag) value associated with the media content or null if unknown.
DateTime getLastModified()
Returns the last modification time of the media content or null if unknown.
String getName()
void setContentLength(long contentLength)
void setEtag(String etag)
void setLastModified(DateTime lastModified)
void setName(String name)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gdata.data.media.MediaSource
From interface javax.activation.DataSource

Fields

protected long contentLength

protected String etag

protected DateTime lastModified

protected final String mediaType

protected String name

Protected Constructors

protected BaseMediaSource (String mediaType)

Constructs a new BaseMediaSource of the specified content type.

Parameters
mediaType

Public Methods

public long getContentLength ()

Returns the length (in bytes) of the media source. A value of -1 indicates the length is unknown.

public String getContentType ()

public String getEtag ()

Returns the entity tag (etag) value associated with the media content or null if unknown.

public DateTime getLastModified ()

Returns the last modification time of the media content or null if unknown.

public String getName ()

public void setContentLength (long contentLength)

Parameters
contentLength

public void setEtag (String etag)

Parameters
etag

public void setLastModified (DateTime lastModified)

Parameters
lastModified

public void setName (String name)

Parameters
name