org.apache.james.mailrepository.file
Class MimeMessageAvalonSource

java.lang.Object
  extended by org.apache.james.core.MimeMessageSource
      extended by org.apache.james.mailrepository.file.MimeMessageAvalonSource

public class MimeMessageAvalonSource
extends MimeMessageSource


Constructor Summary
MimeMessageAvalonSource(StreamRepository sr, java.lang.String repositoryName, java.lang.String key)
          Main constructor
 
Method Summary
 java.io.InputStream getInputStream()
          Return the InputStream
 long getMessageSize()
           
 java.lang.String getSourceId()
          Returns a unique String ID that represents the location from where this source is loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimeMessageAvalonSource

public MimeMessageAvalonSource(StreamRepository sr,
                               java.lang.String repositoryName,
                               java.lang.String key)
Main constructor

Parameters:
sr - The stream repository used by this data source.
repositoryName - The name of the repository
key - The key for the particular stream in the stream repository to be used by this data source.
Method Detail

getSourceId

public java.lang.String getSourceId()
Returns a unique String ID that represents the location from where this source is loaded. This will be used to identify where the data is, primarily to avoid situations where this data would get overwritten.

Specified by:
getSourceId in class MimeMessageSource
Returns:
the String ID

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Return the InputStream

Specified by:
getInputStream in class MimeMessageSource
Returns:
stream return the InputStream
Throws:
java.io.IOException

getMessageSize

public long getMessageSize()
                    throws java.io.IOException
Overrides:
getMessageSize in class MimeMessageSource
Throws:
java.io.IOException
See Also:
MimeMessageSource.getMessageSize()


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.