| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.core.MimeMessageSource
org.apache.james.core.MimeMessageInputStreamSource
public class MimeMessageInputStreamSource
Takes an input stream and creates a repeatable input stream source for a MimeMessageWrapper. It does this by completely reading the input stream and saving that to a temporary file that should delete on exit, or when this object is GC'd.
MimeMessageWrapper| Constructor Summary | |
|---|---|
MimeMessageInputStreamSource(java.lang.String key,
                             java.io.InputStream in)
Construct a new MimeMessageInputStreamSource from an InputStream that contains the bytes of a
 MimeMessage. | 
|
| Method Summary | |
|---|---|
 void | 
dispose()
 | 
 java.io.InputStream | 
getInputStream()
Get an input stream to retrieve the data stored in the temporary file  | 
 long | 
getMessageSize()
Get the size of the temp file  | 
 java.lang.String | 
getSourceId()
Returns the unique identifier of this input stream source  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public MimeMessageInputStreamSource(java.lang.String key,
                                    java.io.InputStream in)
                             throws javax.mail.MessagingException
InputStream that contains the bytes of a
 MimeMessage.
key - the prefix for the name of the temp filein - the stream containing the MimeMessage
javax.mail.MessagingException - if an error occurs while trying to store
                            the stream| Method Detail | 
|---|
public java.lang.String getSourceId()
getSourceId in class MimeMessageSource
public java.io.InputStream getInputStream()
                                   throws java.io.IOException
getInputStream in class MimeMessageSourceBufferedInputStream containing the data
java.io.IOException - if an error occurs while generating the
                     InputStream
public long getMessageSize()
                    throws java.io.IOException
getMessageSize in class MimeMessageSourcejava.io.IOException - if an error is encoutered while computing the size of the messagepublic void dispose()
dispose in interface org.apache.avalon.framework.activity.DisposableDisposable.dispose()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||