# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.appsforyourdomain.migration
Class Rfc822MediaSource

    java.lang.Object
      com.google.gdata.data.appsforyourdomain.migration.Rfc822MediaSource

All Implemented Interfaces:
  MediaSource, javax.activation.DataSource

    public class Rfc822MediaSource

extends java.lang.Object
implements MediaSource

`MediaSource` that wraps an RFC822 message in UTF8 format.

Nested Class Summary

Nested classes/interfaces inherited from interface com.google.gdata.data.media.MediaSource
`MediaSource.Output`

Constructor Summary
`Rfc822MediaSource(java.lang.String rfc822Msg)` Constructs a new `Rfc822MediaSource` from the RFC822 message in UTF-8 format.

Method Summary
`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()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Rfc822MediaSource

    public Rfc822MediaSource(java.lang.String rfc822Msg)

  Constructs a new `Rfc822MediaSource` from the RFC822 message in UTF-8 format.

  Parameters:
    `rfc822Msg` - the text of the RFC822 message

Method Detail

### getContentLength

    public long getContentLength()

  Description copied from interface: `MediaSource`
  Returns the length (in bytes) of the media source. A value of -1 indicates the length is unknown.

  Specified by:
    `getContentLength` in interface `MediaSource`

### getEtag

    public java.lang.String getEtag()

  Description copied from interface: `MediaSource`
  Returns the entity tag (etag) value associated with the media content or `null` if unknown.

  Specified by:
    `getEtag` in interface `MediaSource`

### getLastModified

    public DateTime getLastModified()

  Description copied from interface: `MediaSource`
  Returns the last modification time of the media content or `null` if unknown.

  Specified by:
    `getLastModified` in interface `MediaSource`

### getContentType

    public java.lang.String getContentType()

  Specified by:
    `getContentType` in interface `javax.activation.DataSource`

### getInputStream

    public java.io.InputStream getInputStream()

  Specified by:
    `getInputStream` in interface `javax.activation.DataSource`

### getName

    public java.lang.String getName()

  Specified by:
    `getName` in interface `javax.activation.DataSource`

### getOutputStream

    public java.io.OutputStream getOutputStream()

  Specified by:
    `getOutputStream` in interface `javax.activation.DataSource`