org.apache.james.mailrepository
Class MimeMessageAvalonSource

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

public class MimeMessageAvalonSource
extends MimeMessageSource


Constructor Summary
MimeMessageAvalonSource(org.apache.avalon.cornerstone.services.store.StreamRepository sr, java.lang.String repositoryName, java.lang.String key)
           
 
Method Summary
 java.io.InputStream getInputStream()
          Get an input stream to retrieve the data stored in the datasource
 long getMessageSize()
          Return the size of all the data.
 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(org.apache.avalon.cornerstone.services.store.StreamRepository sr,
                               java.lang.String repositoryName,
                               java.lang.String key)
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
Description copied from class: MimeMessageSource
Get an input stream to retrieve the data stored in the datasource

Specified by:
getInputStream in class MimeMessageSource
Returns:
a InputStream containing the data
Throws:
java.io.IOException - if an error occurs while generating the InputStream

getMessageSize

public long getMessageSize()
                    throws java.io.IOException
Description copied from class: MimeMessageSource
Return the size of all the data. Default implementation... others can override to do this much faster

Overrides:
getMessageSize in class MimeMessageSource
Returns:
the size of the data represented by this source
Throws:
java.io.IOException - if an error is encountered while computing the message size


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