public abstract class BaseMediaSource extends java.lang.Object implements MediaSource
MediaSource interface.MediaSourceMediaSource.Output| Modifier and Type | Field and Description |
|---|---|
protected long |
contentLength |
protected java.lang.String |
etag |
protected DateTime |
lastModified |
protected java.lang.String |
mediaType |
protected java.lang.String |
name |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseMediaSource(java.lang.String mediaType)
Constructs a new BaseMediaSource of the specified content type.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getContentLength()
Returns the length (in bytes) of the media source.
|
java.lang.String |
getContentType() |
java.lang.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. |
java.lang.String |
getName() |
void |
setContentLength(long contentLength) |
void |
setEtag(java.lang.String etag) |
void |
setLastModified(DateTime lastModified) |
void |
setName(java.lang.String name) |
protected final java.lang.String mediaType
protected long contentLength
protected DateTime lastModified
protected java.lang.String name
protected java.lang.String etag
protected BaseMediaSource(java.lang.String mediaType)
public java.lang.String getContentType()
getContentType in interface javax.activation.DataSourcepublic void setName(java.lang.String name)
public java.lang.String getName()
getName in interface javax.activation.DataSourcepublic void setLastModified(DateTime lastModified)
public DateTime getLastModified()
MediaSourcenull
if unknown.getLastModified in interface MediaSourcepublic void setContentLength(long contentLength)
public long getContentLength()
MediaSourcegetContentLength in interface MediaSourcepublic void setEtag(java.lang.String etag)
public java.lang.String getEtag()
MediaSourcenull if unknown.getEtag in interface MediaSource