public class Rfc822MediaSource extends java.lang.Object implements MediaSource
MediaSource
that wraps an RFC822 message in UTF8 format.MediaSource.Output
Constructor and Description |
---|
Rfc822MediaSource(java.lang.String rfc822Msg)
Constructs a new
Rfc822MediaSource from the RFC822 message in UTF-8
format. |
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. |
java.io.InputStream |
getInputStream() |
DateTime |
getLastModified()
Returns the last modification time of the media content or
null
if unknown. |
java.lang.String |
getName() |
java.io.OutputStream |
getOutputStream() |
public Rfc822MediaSource(java.lang.String rfc822Msg)
Rfc822MediaSource
from the RFC822 message in UTF-8
format.rfc822Msg
- the text of the RFC822 messagepublic long getContentLength()
MediaSource
getContentLength
in interface MediaSource
public java.lang.String getEtag()
MediaSource
null
if unknown.getEtag
in interface MediaSource
public DateTime getLastModified()
MediaSource
null
if unknown.getLastModified
in interface MediaSource
public java.lang.String getContentType()
getContentType
in interface javax.activation.DataSource
public java.io.InputStream getInputStream()
getInputStream
in interface javax.activation.DataSource
public java.lang.String getName()
getName
in interface javax.activation.DataSource
public java.io.OutputStream getOutputStream()
getOutputStream
in interface javax.activation.DataSource